title: How to clear input values of dynamic form in react
body: <p>I have a dynamic form as a functional component which is generated via a class based component. I want to make reset button which clears the input field values and sets the state to null array. </p>
  
  <p>Full code is available here: 
  <a href="https://codesandbox.io/s/beautiful-archimedes-o1ygt" rel="noreferrer">https://codesandbox.io/s/beautiful-archimedes-o1ygt</a></p>
  
  <p>I want to make a reset button, clearing all the input values and initializing the Itemvalues array to null.
  Even if I set the values to null, it doesn't clear the input field.</p>
  
  <p>However, the problem I'm facing is that since, it is a dynamic form and a functional component it doesn't have a predefined state for each individual form field making it difficult to set value to null.
  Can  someone please help, I'm stuck on this from a long time</p>