Skip to content
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

有关标签页的问题 #31

Closed
sillyfeng opened this issue Feb 11, 2019 · 1 comment
Closed

有关标签页的问题 #31

sillyfeng opened this issue Feb 11, 2019 · 1 comment

Comments

@sillyfeng
Copy link

老铁好,
我看现在的标签页是记录了打开的routeDate, 但是每次点击的时候他都会重新render,页面上的内容是记录不了的,这样子不也就失去了标签页的意义了么。
不知道是不是我理解的有问题,目前是这样子吗?可以进行调整吗?

@weiq
Copy link
Contributor

weiq commented Feb 11, 2019

现在有两种方案:

一种是使用修改的route方案,比如react-router-cache-route,替换一下程序中的路由

另一种是把程序中的所有状态都放到model里,用redux来保存状态,可参考CRUD的model,原理是只在第一次加载时请求数据,之后进行切换时,不会主动加载

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants