-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[优化]首页改版 #94
Comments
Branch i94-_优化_首页改版 created! |
点击进入项目介绍页面后返回,首页自动刷新到头部,能否考虑进入介绍页面时缓存首页内容。 |
猜测是不是需要一个缓存location的内容? const location = useLocation()
const state = location.state as { backgroundLocation?: Location }
<Routes location={state?.backgroundLocation || location}>
...
<Route path={"/repo-details"} element={<RepoDetails />} />
</Routes>
// 返回列表,其实任何页面进入了详情,都是缓存的
navigate(-1)
// 导航去别的页面
navigate("others") https://dev.to/devmdmamun/create-contextual-modal-navigation-with-react-router-v6-28k2 |
@WShihan 现在的项目介绍页是在新的页面中打开的,如果要返回上一个页面建议直接把当前页面关闭就可以了。 |
@WShihan done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
HelloGitHub 社区首页正在动工改版!将围绕 更方便、增强互动、独特性 的方向进行优化,诚邀您体验后进行反馈。地址:https://hellogithub.com/
目前的改动计划:
如果您有什么建议,欢迎留言讨论。
The text was updated successfully, but these errors were encountered: