I have my "Link to" under a text field that updates my states but I get an error why I try the results.
The error I get is: TypeError: Cannot read property 'getProps' of undefined
This is my AdvancedSearch page:
<Link
to={{
pathname: "/Results",
getProps: {
searchGet: this.state.search,
movieGet: this.state.movies,
totalResultsGet: this.state.totalResults,
currentPageGet: this.state.currentPage
}
}}>
<Button variant='contained' > Show results </Button>
</Link>
And this is the Results page that I want the states to be transferred to:
const Results = (props) => {
console.log("about",props.location.getProps)
return (
<div>
Test
</div>
)
}