How to make sure that the data remains after re-rendering the state ? #21503
-
This is the code that I am trying to re-render after my submit. But the problem is that each time I try to submit my form, the data that I had accessed from the previous page(from DB) always disappear and gives an error saying undefined!!
This is the component that is rendered on the Main page. This component also has access to the data from the previous page using this.props.history.push({pathname:’/AdminPage’,state:json});
I just need a way to keep the data from the previous page even after complete rendering. These are the errors displayed. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Solved it !! Using Redux. |
Beta Was this translation helpful? Give feedback.
Solved it !! Using Redux.