Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

form in react

  const [inputs, setInputs] = useState({});

  const handleChange = (event) => {
    const name = event.target.name;
    const value = event.target.value;
    setInputs(values => ({...values, [name]: value}))
  }
Source by dmitripavlutin.com #
 
PREVIOUS NEXT
Tagged: #form #react
ADD COMMENT
Topic
Name
8+2 =