aksonov / aksonov/react-native-router-flux

Application renders unnecessarily when we change state in App.js

未关闭
#3,807 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
8.9k
派生
2.1k
PR 合并指标
30 天内没有已合并 PR

描述

### Version
Tell us which versions you are using:

- react-native-router-flux v4.3.1
- react v17.0.1
- react-native v0.64.2

### Expected behaviour
I have bind separate router component/file into App class.
While change state variable to App class, it render whole application.
When I update state variable, it render unnecessarily.

### Actual behaviour
If we change any state variable in App class even it should not render app and should not re render children components

### Steps to reproduce
For non-obvious bugs, please fork this component, modify Example project to reproduce your issue and include link here.
1. Bind router component to App.js
2. Add state variable to App.js as test. And on click of on Button change param of that state.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。