I have an async function that I want to call that waits on user action and resolves after some processing:
async function waitOnUserInput() {}
I want to wait on user input do some processing and repeat, so;
I want to implement this recursively like this:
async function actionUserStep() {
await waitOnUserInput();
actionUserStep();
}
Would this lead to a memory leak or a stack overflow of some sort? Or is this a bad way to model this kind of interaction?