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 failed with react-native

See original GitHub issue

I don’t know react-native or react-redux has the problem, but I think it be ignored if I post it as react-native’s issues.

I created a project to reproduce this: https://github.com/cpunion/ReproRN24HMRWithReactRedux

Create steps

$ react-natie init TestHMR24
$ cd TestHMR24
add reducer.js
modify index.ios.js to add store, Provider

Test steps

  • open ios/TestHMR24.xcodeproj
  • run on simulator
  • enable Hot Reloading
2016-04-19 12 10 59 - touch reducer.js, has error 2016-04-19 12 11 12 - touch reducer.js, get well - After this step, hot reloading always success, just failed on first update.

Issue Analytics

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

github_iconTop GitHub Comments

16reactions
cpunioncommented, Apr 19, 2016

Used a workaround, just put store into a state or object field:

class App extends Component {
  state = {
    store: configureStore()
  }
  render () {
    return (
      <Provider store={this.state.store}>
        <TestHMR24/>
      </Provider>
    )
  }
}
2reactions
cpunioncommented, Apr 19, 2016

I found my code has error, react-native’s HMR has different module.hot.accept method, it’s not accept(path, callback), it’s accept(callback), so it just used it in configureStore module. I fixed code, but same result.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hot Reload is not working in my React App - Stack Overflow
Hot Reload is not working in my React App · This does happen sometimes. Do npm install and try adding some code. ·...
Read more >
Hot Reloading is not working · Issue #18899 - GitHub
Run react-native init NoHotLoad · Run react-native run-android · When the project loaded, enable the Hot Reloading · Make changes to the App.js, ......
Read more >
react-hot-loader - npm
React Native supports hot reloading natively as of version 0.22. Using React Hot Loader with React Native can cause unexpected issues (see #824) ......
Read more >
Difference between Hot Reloading and Live ... - GeeksforGeeks
Hot reloading allows you to see the changes that you have made in the code without reloading your entire app. Whenever you make...
Read more >
React Native Fast Refresh is here! RN 0.61+ - YouTube
React Native fast refresh is a new way to hot reload apps built with React Native, but this time much more stable and...
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