-
Notifications
You must be signed in to change notification settings - Fork 10
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
React Hot Loader 3.0 beta demo #45
Comments
Very exciting! |
This works great :) |
Closing, this is the default in the upcoming release, fully documented and works great. |
When do you foreseee the next realese? Looking forward ;) |
I'm actually having trouble with this. I tried it yesterday and it seems like some of my components are no longer being hooked up to the redux store. My root component is also in a package and I'm not sure if that's causing issues but I couldn't seem to get it to hot reload. I tried both Did you test this with Meteor packages? |
@tomitrescak, should have an early experimental release out this weekend. Or you can run from master :) @clayne11, what version / checkout are you using? There was an issue with hot loading the "new" way with the first release (if it still says "Hotloading with deps is not well tested" or something to that effect). I found a bug after that and fixed, and eventually removed the warning after I'd spent more time with it and it seemed good. Basically if checkout, 0b67248 should be good. My only upcoming changes now are to try remove binary deps to make it less of a pain to publish. Re the store and packages, are you able to put it online? I'll take a look as soon as I've managed to actually publish the current code (iirc I managed to publish for linux, the build machines were driving me mad yesterday). |
I'm trying out I had to remove the When I save a file, I'm getting the following error: This is all within a Meteor package as well. |
Oops, re-opening this since I asked to track RHL-related stuff here. That's strange about During the refactor I broke the support for Meteor packages. I just fixed this in Let me know. |
Your changes in |
Some good news, at least :) Check the react-hot-loader repo if anyone has had a similar issue. If you have time to do it, and can reproduce in the react-hotloader-starter boilerplate (I think that's what it's called), I think that could help. Or even just to to establish whether it's the same thing in a clean project and whether or not ecmascript-hot has anything to do with it. |
I'm having a new issue now where the hot-reloading code in |
I think I found the issue. It looks like the hot-reloading code doesn't work across Meteor package boundaries. In The issue is that it doesn't seem to look at Meteor package imports. Within a Meteor package, the relative dependencies ( |
It seems like the common issue here is the Meteor package system. I'm thinking that the I'm starting the painful process of migrating my entire app over into the I transitioned a few pages over to start and |
Great stuff, kinda. Thanks for all the detailed info. I started to look into this but ran out of time, but from looking at the |
Yeah, I'm sure the hot-reloading across Meteor packages can be fixed but using proper ES6 imports throughout my project is going to be much nicer in the long run since I will be less reliant on Meteor and more able to use off-the-shelf Npm packages like I'm also not sure if |
New bug - when a module with an export is modified that is not imported by anything the same error posted earlier is thrown (at exactly the same line). |
@clayne11 it just occured to me that your Regarding imports from packages, see these:
As for the new bug, can you be a bit clearer? If a module is not imported by anything that error is correct (and it should let Meteor's HCP come through). But how are you using a module without importing it? If you mean a package or an eagerly loaded file from outside of |
For the Looks like the Meteor package problem won't be fixed until a fix lands for that issue. As for the bug I mentioned, it's very minor. It's happening while I'm developing a new component. Typically I will create a component, start implementing it, and then later on connect it up to the UI. When the component exists but isn't being imported by anything (which for my workflow means I'm developing it), every time I save I'm getting the error that Thanks for all the work on this, it's really coming along. |
Yeah, I'm going to see if I can submit a PR for the Meteor issue, hopefully will have time to look into it before the weekend. Ah ok, I got it! I'll look into that, tracking in #54. Thanks! And also for the help recently. Yeah, I originally had much more modest intentions for this, but it's made such a big impact on my dev work that I'm motivated to keep improving it. It's exciting now to offer the full HMR API and support for other build plugins! |
Quick note that <AppContainer component={AppRoot} props={{prop1:val1}} /> to <AppContainer>
<AppRoot prop1={val1} />
</AppContainer> |
Thanks everyone for helping with the early work here. If any more issues arise with RHLv3, please open a new issue for it. |
|
See gaearon/react-hot-boilerplate#61.
Requires
gadicc:ecmascript-hot@1.3.2-refactor.7
.Remove the old setup
npm rm --save-dev babel-plugin-react-transform react-transform-hmr react-transform-catch-errors
Remove the entire
react-transform
section from yourclient/.babelrc
env blockModify your
package.json
to have a section like:Add the new setup
npm install --save-dev react-hot-loader@^3.0.0-beta.1
(check latest release)In your project root
.babelrc
, make sure you have{ "plugins": ["react-hot-loader/babel"] }
Modify your main client entry point / wherever you mount your root to resemble:
You need to
import 'react-hot-loader/patch';
before importing React. If you have a single client entry-point and get everything else fromimports
, just add this as your first line. If you still use a "regular" client directory (with more than 1 file), try place just this line in a file calledclient/_patchReact.js
(or possibly inclient/lib
if you use react from within that directory).There's an (incredibly convoluted) example at https://github.com/gadicc/meteor-react-hotloader/tree/master/demo-rhl3.
There's also a mantra-sample-blog-app-hot example. Unfortunately default Mantra routing leads to a slightly weird pattern but it's not too bad.
The text was updated successfully, but these errors were encountered: