-1

I have a button that add a number to counter array, and based on counter, I want to generate a form over and over again. But I have a object state and whenever I click the button and generate a new form, the previous values of previous states that I answered, are there and I can't generate some new states, I really don't know what to do.

1 Answers1

-1

You could make your "form" into a React component, and have it manage its own state. Then, when you make a new form component, it will start at the default state.

It is difficult to understand what you are trying to do from your question. If may help if you update your question with a snippet of code showing what you have tried.

Dave
  • 7,552
  • 4
  • 22
  • 26