I am curious about using typescript feature, which is async/await, with lifecycle hooks.
The feature is really convenient but is it okay to make lifecycle hooks async?
I've tested this approach many times and it works as intended but I couldn't find any reliable answer is it good practice and I'm afraid it may be not.
for illustration:
Angular:
async ngOnInit() {
await someAsyncFunction();
}
Ionic:
async ionViewWillEnter() {
await someAsyncFunction();
}