Skip to content

State update clears the fields #114

Closed Answered by AleFossati
samuel-oliveira-fcamara asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @samuel-oliveira-fcamara, it looks like you are re-rendering your component and consequently the Secure Fields because of state update. That's why it looks like the inputs are being cleared, but in fact what is happening is that you are reloading them completely.

Here's some links regarding React lifecycle that may help you.
React.dev - Memo
Medium - React Components rendered twice
Medium - Wait, you’re not using <React.StrictMode>?!

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by icaldana
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