I want to directly send props to a component. Is there a way to do this?
const navigate = useNavigate();
useEffect(()=>{
.....
navigate ("/projectpage"); //send props here
},[]);
I want to directly send props to a component. Is there a way to do this?
const navigate = useNavigate();
useEffect(()=>{
.....
navigate ("/projectpage"); //send props here
},[]);
The most common way of tackling this need is to pass the data as params to your navigation that you can access with the useParams hook.