Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
0 points
mstudio
5y ago
0 comments
Share
This does not work. setMyState() is asynchronous. doSomething() would run, but not necessarily with the updated value of the state.
undefined | Better HN
0 comments
default
newest
oldest
schwartzworld
5y ago
Then make the wrapper function async and await setMyState?
j
/
k
navigate · click thread line to collapse