Skip to content

Why does my Form reset/cleared when I use useState [React] #68

Closed Answered by sergeythrees
junixquiaoit asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, @junixquiaoit
you forgot to wrap the loadForm function in a useCallback, so a re-render occurs.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@junixquiaoit
Comment options

@sergeythrees
Comment options

Answer selected by sergeythrees
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants