2 years ago
#62781
Andrea
React Router Dom History goBack injecting state
Is there a way to use the history hook function goBack()
, in the same way, we use the Link component?
<Link to={{pathname:'/brand', state: {id}} />
Let's say I want the user to be able to go back to a previous page with an indexed table, to a precise table page. so I will first pass the index value in the Link state component, then on the way back using goBack()
is there a way to pass again the state in order to redirect to that specific index?
hope it's clearer now
reactjs
react-dom
0 Answers
Your Answer