Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

KeepAlive由于使用PureCompoennt实现会影响子组件正常渲染 #100

Open
qiqiboy opened this issue Oct 13, 2020 · 0 comments
Open

Comments

@qiqiboy
Copy link

qiqiboy commented Oct 13, 2020

复现示例

https://codesandbox.io/s/with-react-router-forked-uy566

One 这个路由下,点击 add num 按钮,无法将父级的状态传递到KeepAlive下层的组件上,因为对于KeepAlive组件来说它本身的props并没有发生改变,所以基于PureComponent的实现导致其阻止了它下层组件的渲染。

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

No branches or pull requests

1 participant