We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the problem A clear and concise description of what the bug is.
Actual behavior A clear and concise description of what you experienced.
Expected behavior A clear and concise description of what you expected to happen.
To Reproduce Steps to reproduce the behavior:
Screenshots If applicable, add screenshots or gifs to help explain your problem.
Your Environment:
Additional Information Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
const clearState = () => { // set_results({...intialState}); //when clicking the retry button, it set the result value as{ introvert: 1, extrovert: 0, count : 1} set_results({...{introvert: 0 , extrovert: 0, count : 0}}); console.log('in clearState',results) }
Sorry, something went wrong.
#22 Can't use initializing variable
2d272a9
- Made the value to set everything to be 0 which is 'initialState' - When clicking Retry button it count up -- introvert value -- count value
https://thewebdev.info/2021/02/05/how-to-reset-to-initial-state-with-react-hooks/#:~:text=Resetting%20States%20to%20Initial%20State&text=Then%20we%20call%20useState%20in,the%20state%20and%20re%2Drender.
No branches or pull requests
Describe the problem
A clear and concise description of what the bug is.
Actual behavior
A clear and concise description of what you experienced.
Expected behavior
A clear and concise description of what you expected to happen.
To Reproduce
Steps to reproduce the behavior:
Screenshots
If applicable, add screenshots or gifs to help explain your problem.
Your Environment:
Additional Information
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: