I am having an issue where I am trying to pass state on a link but I keep getting undefined when using the state. My Quiz card layout function takes in the details and then links the page when the button is clicked passing the details as the state. Then in my child/link function, I try using the state.
-- I am trying to pass props in my Link by using the state in which I can then refer to my child/linked function to use the information passed on. I am currently learning React (16.2) and any information would be appreciated thank you. I am using functional components as well would there be a better approach? My initial approach is when the user clicks the button it'll link them to a new tab page and display the information from the previous page via the Link. I will post more info if needed.
In my child/link PetLayout function, I tried using the props to see if it contains the state and the useLocation but both are undefined.
In my App js I have the Route
UPDATE: My issue was the target = '_blank' in this case it works now. Why does the target = '_blank' cause this issue where the state is undefined?