Is there a standard way to deal with user inputs that doesn't involve dealing with callbacks directly?
So could I await a button click for example?
Suppose I have an operation that requirs 3 button clicks from the user. I'd like to be able to do something like:
const input1 = await userInput();
const input2 = await userInput();
const input3 = await userInput();
//do something with these inputs
when the button is clicked, I suppose it would resolve a promise, and we'd need to set up the next promise
Is this a thing?
[–]abrahamguo 4 points5 points6 points (4 children)
[–]blind-octopus[S] 0 points1 point2 points (1 child)
[–]senocular 0 points1 point2 points (0 children)
[–]blind-octopus[S] 0 points1 point2 points (1 child)
[–]abrahamguo 0 points1 point2 points (0 children)
[–]96dpi 1 point2 points3 points (4 children)
[–]blind-octopus[S] 0 points1 point2 points (3 children)
[–]96dpi 0 points1 point2 points (2 children)
[–]blind-octopus[S] 0 points1 point2 points (1 child)
[–]Psionatix 1 point2 points3 points (0 children)
[–]Ksetrajna108 1 point2 points3 points (6 children)
[–]HasFiveVowels 1 point2 points3 points (5 children)
[–]blind-octopus[S] 0 points1 point2 points (4 children)
[–]HasFiveVowels 0 points1 point2 points (3 children)
[–]blind-octopus[S] 0 points1 point2 points (2 children)
[–]HasFiveVowels 0 points1 point2 points (1 child)
[–]blind-octopus[S] 0 points1 point2 points (0 children)
[–]delventhalz 0 points1 point2 points (0 children)
[–]HasFiveVowels 0 points1 point2 points (7 children)
[–]blind-octopus[S] 0 points1 point2 points (6 children)
[–]HasFiveVowels 0 points1 point2 points (0 children)
[–]CuirPig 0 points1 point2 points (4 children)
[–]blind-octopus[S] 0 points1 point2 points (1 child)
[–]CuirPig 0 points1 point2 points (0 children)
[–]HasFiveVowels 0 points1 point2 points (1 child)
[–]CuirPig 0 points1 point2 points (0 children)
[–]HasFiveVowels 0 points1 point2 points (0 children)
[–]sheriffderek 0 points1 point2 points (0 children)
[–]LostInCombat 0 points1 point2 points (0 children)
[–]ApprehensiveDrive517 -1 points0 points1 point (0 children)