i have a dummy project.in my project i have two pages.(test1 & test2) i want passing a prop from page1 to page2.i know that i can use useRouter hook but i don't want set this prop as a query string. in my test1 page i have a color variable.this is const and have a yellow value.i want use this color in my page2 as a prop(props.color) this is my test1 page
import React from 'react';
const Test1 = props => {
const color='yellow';
return (
<div>
test1
</div>
);
};
export default Test1;
and this is my test2 page
import React from 'react';
const Test2 = props => {
return (
<div>
Your color is {props.color}
</div>
);
};
export default Test2;