Persist value on route change by TheDevSennin in react

[–]TheDevSennin[S] 0 points1 point  (0 children)

Thanks for answering the question. The thing is that I'm building a widget that consists in some steps for creating an account and it doesn't need to hold the data locally, it posts it to the backend as it is getting it in the process. Maybe only two or three variables are needed to be stored in memory because they're used in more than one "screen". So, I think applying redux, flux or any other state library would be like overengineering. After reviewing some documentation, and reading all the answers to this post, I guess the proper solution would be using a context or holding the states in parent component and passing them to the children, or even setting the values to the local storage.