Redirect to component page after passing the component props

How to redirect automatically to component page after passing it its props

const onSubmit = (data:any) =>{
         <ScanNew formData={data}/>

Ended up using localStorage to store the data and then accesing it when i route to the other page

this is not the best approach… you should use a state manager, there are tons of solutions,

here are some sample projects

Thank you, ended up using redux

1 Like