Skip to content
New issue

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

Can't Initialize the value of State when clicking Retry button #22

Open
hyerimYeom opened this issue May 3, 2022 · 2 comments
Open
Labels
bug Something isn't working

Comments

@hyerimYeom
Copy link
Contributor

hyerimYeom commented May 3, 2022

스크린샷 2022-05-04 오전 2 11 14

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:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Screenshots
If applicable, add screenshots or gifs to help explain your problem.

Your Environment:

  • Your browser & its version
  • Any other software that may impact this issue

Additional Information
Add any other context about the problem here.

@hyerimYeom hyerimYeom added the bug Something isn't working label May 3, 2022
@hyerimYeom
Copy link
Contributor Author


    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)
    }

hyerimYeom added a commit that referenced this issue May 3, 2022
- Made the value to set everything to be 0 which is 'initialState'
- When clicking Retry button it count up
-- introvert value
-- count value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant