We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
At https://github.com/gaearon/react-hot-loader/blob/master/docs/Troubleshooting.md, you say that
const anyModule = module as any; if (anyModule.hot) { anyModule.hot.accept('./app', () => render(App)); }
will lead to full page reloads, but
if ((module as any).hot) { (module as any).hot.accept('./app', () => render(App)); }
will work. I am pretty confused by that, as I'd expect both to lead to the same result. Not understanding it makes it harder to remember too.
Could you maybe add to the document why it is behaving like this?
(Or if you don't have the time to do that at the moment, give me a hint here?)
The text was updated successfully, but these errors were encountered:
I am pretty sure this example was not updated in past 4 years, so just not trust it 😅
Sorry, something went wrong.
Haha. Fair! But I'm still pretty curious as to why those two would be (have been in the past?) any different.
Nowadays you should not use any module.hot in terms of React-Hot-Loader at all - there is react-hot-loader/root which does under the hood.
module.hot
Don't worry, I know that. I was more wondering as to what language feature I am missing that makes these two examples any different.
No branches or pull requests
At https://github.com/gaearon/react-hot-loader/blob/master/docs/Troubleshooting.md, you say that
will lead to full page reloads, but
will work. I am pretty confused by that, as I'd expect both to lead to the same result. Not understanding it makes it harder to remember too.
Could you maybe add to the document why it is behaving like this?
(Or if you don't have the time to do that at the moment, give me a hint here?)
The text was updated successfully, but these errors were encountered: