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