question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[NavigatorIOS] doesn't update when passProps update

See original GitHub issue

I’m not sure if this is a feature or a bug:

When I change the value of passProps of a navigator, I expect it would re-render again, just like other react components do. However, it seems it will not do so.

For example,

          <NavigatorIOS
            style={{flex: 1}}
            initialRoute={{
              component: MyChatList,
              title: "My Chat List",
              passProps: {
                recentChats: this.state.ChatListData.recentChats,
                renderRow: this.renderRecentChat,
              },
            }} />

When the state ChatListData (which comes from flux) updates, the navigator will not update it self correspondly.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:4
  • Comments:33 (15 by maintainers)

github_iconTop GitHub Comments

14reactions
baksocommented, Apr 10, 2015

I don’t know

6reactions
aphillipocommented, Sep 13, 2015

Yes. Please either remove it so people don’t get confused or put a big red warning in the docs saying “this component breaks the underlying working of react”. Wasted time until I found this bug.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why redux mapStateToProps doesn't update component ...
Try to add a simple console.log into mapStateToProps function to see whether it's called when state.publis changes. If it's not, something is ...
Read more >
Troubleshooting | React Navigation
I'm getting an error "Unable to resolve module" after updating to the latest version​. This might happen for 3 reasons: Stale cache of...
Read more >
Getting Started with Stack Navigator Using react ... - Heartbeat
This prop is passed to every screen that is a route wrapped by the stack navigator. Here is the changed Home screen: Enabling...
Read more >
react-native-navigation - npm
React Native Navigation - truly native navigation for iOS and Android. ... Update project dependencies in build.gradle under app folder.
Read more >
How To Use Routing with React Navigation in React Native
Then, navigate to the new directory: cd MySocialNetwork. Copy. And start the application for iOS:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found