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?)
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?)