So, I'm having a hard time passing data between two unrelated components. I have this code below, but I don't know how to receive it from the other component
<Button
className='search__button'
variant="contained"
color="primary"
size="large"
component={Link}
to={{
pathname: "/home",
state: { data: results }
}}
>
I want to pass the variable "results" which is a Map of a string and an object Book (Map<string, Book>) to a component. Basically, my question is, how do I retrieve data in my Home component?
Thank you