send data through routes in react
const navigate = useNavigate();
navigate('/other-page', { state: { id: 7, color: 'green' } });
send data through routes in react
const navigate = useNavigate();
navigate('/other-page', { state: { id: 7, color: 'green' } });
how to send data between components in react using link
<Link
to={{
pathname: "/page",
state: data // your data array of objects
}}
>
send data through routes in react
const {state} = useLocation();
const { id, color } = state; // Read values passed on state
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us