gadicc / meteor-hmr

Hot Module Replacement for Meteor; in your app, with react, with build plugins

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

.babelrc with latest

tomitrescak opened this issue · comments

Looks like with the latest version there is not need for following .bablerc to work with React

{
"plugins": [ "react-hot-loader/babel" ]
}

Actually, what is wicked, that without that babelrc I am not receiving the nasty error from the React router remount ... it's a kind of magic.

hot .. connected .. and ready ... sounds, well you know ... ;)

Haha I hadn't thought about that before.

Hot loading of react components works with just plain meteor-hmr, but state is not preserved. That's fine if you keep all your state in an external state store like Redux. Nothing else needed.

However, you might still have state in some components, even if you're redux for most of your state, e.g. a dialog package which maintains it's own open/closed state. For that you'll need the react-hot-loader patch to ensure that state is retained.

As I understood those react router errors are harmless? Unless we're talking about something else. I don't recall the router actually being remounted, just something about changed parameters or something.

Ah, so it is as though it is, that state is lost. Yes, those error messages are harmless. Everything seems to work fine with this build! Great work!

Thanks!