This is what the state
prop is for. Docs here
Here is what you need. Your Link component should look like this:
<Link
to={{
pathname: "/movie",
state: {
searchGet: "Val 1",
movieGet: "Val 2",
totalResultsGet: " Val 3",
currentPageGet: "Val 4"
}
}}
>
Movie
</Link>
And the way you would access that state in the Result
component is...
const { searchGet, movieGet } = props.location.state;
This will only work though if you render your Result
component as part of the Router like so:
<Switch>
...
...
<Route path="/movie" component={Result} />
</Switch>
Here is a Sandbox for you to play around with.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…