📜  下一个更改路由 useContext 时状态更改 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:09.557000             🧑  作者: Mango

代码示例1
//If the user refreshes the page the app reset so you will lose any state yes,
//to navigate to different pages without refreshing the page you have to use the 
//Link component from next/link (or react-router-dom if using React), if you want to preserve the user state
//between refreshes you can save it to the localStorage