aksonov / aksonov/react-native-router-flux

React Native router flux not getting correct focused value on icon render

Đang mở
#3,341 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
8.9k
Fork
2.1k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Version
- react-native-router-flux v4.0.1
- react v16.3.1
- react-native v0.55.4

### Expected behaviour
I need to get the focused as true for the selected ones.

### Actual behaviour
Now, when I load my project I would get both 'true' and 'false' from focused value. That, I think it would render 2 times with different values.

This is my code

{
console.log(selected); return (

);
}}
{...DefaultProps.navbarProps}
>

{
console.log(focused); return (

);
}}
{...DefaultProps.navbarProps}
>

{
console.log(selected); return (

);
}}
{...DefaultProps.navbarProps}
>



Result of the code:
true
false
true
false
true
false
true
false
true
false
true
false

When I click on the tabs , this same pattern would reproduce.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.