-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hot Reload not working in 0.59.4 #24489
Comments
Can you run If you believe this information is irrelevant to the reported issue, you may write `[skip envinfo]` alongside an explanation in your Environment: section.
|
Updated my Environment Section |
Are you able to replicate with a new minimal react-native app? And does hot reloading work for a previous version of react-native with your code? |
@JKCooper2 I upgraded my react native project from 0.57 to 0.59 using rn-diff and it no longer hot reloads any changes to the UI. It is showing the hot reloading toast message but nothing changes. I then created a new project and tried, this time the hot reloading is working fine in the new project. I had to downgrade back to 0.57 because of this issue. My environment details:
|
@DaniAkash unfortunately if its working with a new project but not with your existing one then it's likely either something hasn't been updated correctly, or there's an issue with your code. I would recommend checking out the your upgrade process, as its the most likley culprit |
I am closing this issue because it does not contain the necessary environment info, and there has been no followup in a while. If you found this thread after encountering the same issue in the latest release, please feel free to create a new issue with up-to-date information by clicking here. |
@JKCooper2 updated my project to React Native 0.60 and hot reload is still broken. However this time, even the new projects are not hot reloading. Even tried it on a different machine and hot reload is broken! |
@DaniAkash make sure to test with a non functional component, ran into the same issue before finding expo/expo#4957 (comment) :
|
|
@rastapasta my components are wrapped in decorators. I'm using MobX so they will have const ErrorBoundary = ({ isRoot } = {}) => WrappedComponent => {
return class extends Component {
static navigationOptions = WrappedComponent.navigationOptions;
state = {
isCrashed: false
};
componentDidCatch(error, errorInfo) {
logError(error, { errorInfo });
if (!this.state.isCrashed) {
this.setState({
isCrashed: true
});
}
}
render() {
if (this.state.isCrashed) {
return (
<CrashScreen isRoot={isRoot} navigation={this.props.navigation} />
);
}
return <WrappedComponent {...this.props} />;
}
};
}; So all class components are wrapped in this error boundary decorator... |
Also, make sure you don't have an index.lock file in your .git directory :) Deleting it could solve your issue. |
I'm facing the same issue, since the beginning of my project.
A way to fix it? |
React Native 0.61 includes a complete reimplementation of this mechanism called Fast Refresh. It's not out yet as stable, but you can already try React Native 0.61 RC 3. I'll close and lock this because the implementation is completely different. So if there are still problems after you upgrade to 0.61, please file a new issue with full reproducing instructions (and preferably, a project). Thanks! |
Hot Reloading is not updating the view in Android device even we have made changes. It happens after a Reload triggered from the device.
Environment
Node: 10.15.1
Xcode: N/A
System:
OS: Windows 10
CPU: (4) x64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
Memory: 1.54 GB / 7.87 GB
Binaries:
npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.3.0.0 AI-182.5107.16.33.5199772
Steps to Reproduce
react-native run-android
Expected Behavior
The Hot Reloading should be able to hot-reload all the changes, regardless number of attempts of reload.
Actual Behavior
The Hot Reloading only works before a Reload action triggerred
The text was updated successfully, but these errors were encountered: