some of the states
const [initialValues, setInitialValues] = useState({
companyname: "",
website: "",
email: "",
phone: "",
});
const [formValues, setFormValues] = useState([]);
const handleSubmit = () => {
setFormValues((prevFormValues) => [...prevFormValues, initialValues]);
}
**i tried to apply logic to store only unique data and non empty data from form field but get confused in localStorage using setItem to formValues key element **
useEffect(() => {
}, [formValues]);