i want to get the values from 5 input fields and save them inside a single state of arrays , how can i achieve that ?
const [features,setFeatures] = useState([]);
const handleChange = e => {
setFeatures(prev => ({ ...prev, features, [e.target.name]: e.target.value }))
}
<Input type="text" name="features" label="Feature 1" value={features} required change={handleChange} />
<Input type="text" name="features" label="Feature 2" value={features} required change={handleChange} />
<Input type="text" name="features" label="Feature 3" value={features} required change={handleChange} />
<Input type="text" name="features" label="Feature 4" value={features} required change={handleChange} />
<Input type="text" name="features" label="Feature 5" value={features} required change={handleChange} />
formand you want to get them while the form is submitted, is that the case?