this is users component i want to pass the local storage data to view and i am not sure how can i do that
const [formValues, setFormValues] = useState([]);
useEffect(() => {
const formValues = localStorage.getItem('formValues')
if(formValues){
setFormValues(JSON.parse(formValues));
}
}, []);
in view component
const View = ({values}) => {
// useEffect(() => {
// const localRows = localStorage.getItem("formValues");
// if(localRows){
// setRows(JSON.parse(localRows));
// }
// },[]);
return (
<table>
<tr>
</tr>
<tr>
<td>
</td>
</tr>
</table>
)
}