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.

Hot Reloading not working with React-navigation (refreshes entire route stack to initialRoute instead of just the component)

See original GitHub issue

Description

I’m having trouble getting hot reloading to work on our app. Changes seem to be submitting / the app shows a banner showing that changes are applied but nothing happens / updates.

If I change the entry point index component to be a stateful component which returns the App component, then changes seem to update but the react-navigator stack resets to the initial route.

Can anyone please help!? I previously was having this error with Navigator, but was told to try updating to react-navigation (which I have) and am still facing the error.

In the state that causes an entire app refresh, the App file is structured like:

render(){
      <Provider store={store}>
            <HomeStack />
      </Provider>
}

Additional Information

React Native version: 0.39.2 Platform: iOS Development Operating System: MacOS Dev tools: Xcode

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:17
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

9reactions
marstallcommented, Apr 28, 2017

can someone help me with coding this solution - what, in code, does “converting the components I load in my navigators to classes” look like? Thanks! @frankmarineau

5reactions
hramoscommented, Jul 25, 2017

Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we’re automatically closing issues after a period of inactivity. Please do not take it personally!

If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:

  • Does the issue still reproduce on the latest release candidate? Post a comment with the version you tested.
  • If so, is there any information missing from the bug report? Post a comment with all the information required by the issue template.
  • Is there a pull request that addresses this issue? Post a comment with the PR number so we can follow up.

If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to stop Fast refresh reset route to initialRoute ...
I am using React Native 0.62.2. The problem is when code updated, it goes to initalRoute automatically, so I need to navigate to...
Read more >
React Router with Redux: Understanding navigation state
Use React Router to declaratively navigate within your React and Redux applications and maintain state across your app's navigation ...
Read more >
Top 30 React Native Interview Questions (2022) - InterviewBit
Hot reloading only refreshes the files that were changed without losing the state of the app. For example, if you were four links...
Read more >
react-native-router-flux | Yarn - Package Manager
react-native-router-flux is a different API over react-navigation . It helps users to define all the routes in one central place and navigate and ......
Read more >
auto_route 1.0.0-beta.10 | Flutter Package - Pub.dev
AutoRoute is a declarative routing solution, where everything needed for ... Fix hot reload issue #170; Fix Hero animations not working with the...
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