Thanks for the information! I would like to ask if the context could survive page refresh? Since in my project I use stores to store all global variables and they will be reset after page refresh.
Thanks in advance :)
Context doesn't save data on refresh, to achieve that you can save data to local storage, cookies, or session. If you are using redux for state management, there is redux-persist package that will do the same.
Thanks for the information! I would like to ask if the context could survive page refresh? Since in my project I use stores to store all global variables and they will be reset after page refresh.
Thanks in advance :)
Context doesn't save data on refresh, to achieve that you can save data to local storage, cookies, or session. If you are using redux for state management, there is redux-persist package that will do the same.
context doesn't have, what you are asking.