You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This discussion was converted from issue #255 on January 07, 2024 23:20.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I was in a situation where I need to trigger a function only after I really changed the state and I don't want to trigger it on mount and this article https://medium.com/geekculture/usecallbackstate-the-hook-that-let-you-run-code-after-a-setstate-operation-finished-25f40db56661 really helped a lot. :)
see https://gist.github.com/paoloricciuti/0b44dee77379c3bb0c1ae97097584b92#file-usecallbackstate-ts
Beta Was this translation helpful? Give feedback.
All reactions