-
Notifications
You must be signed in to change notification settings - Fork 801
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
Get it working with SystemJS #275
Comments
I can confirm that react-hot-loader does indeed work the same for jspm as it does webpack. As far as I can see, the state is reset under the same circumstances that it resets while using webpack. For example, inserting a new node above this line causes a state reset for both jspm and webpack, whereas changing the JSX below that line works fine for both. |
Can you give |
@gaearon Figured out a way to reproduce. This works ReactDOM.render(
<AppContainer><App /></AppContainer>,
rootEl
); this fails ReactDOM.render(
createElement(AppContainer, null,
createElement(App),
rootEl
); |
@gaearon I wonder if it isn't because Im using createElement which I import from react. This should be overwritten shouldn't it? |
As long as |
Might be caused by this: #276 (comment). |
@gaearon Yeah Looks about right |
Hmm. But no, you are using |
Hmm. Ill force it to load well before to test... Also, I've never used JSX but I thought it was a source transform... How does it get access to |
@gaearon I loaded |
@gaearon Nope. Only one version of react is being loaded |
Yeah, hard to guess. I’ll need to look into this when I get some time. |
@alexisvincent Hey, I was taking a look at this and unable to install via your repo's instructions. On |
Hi @calesce, I'm glad you replied because a few days ago I hit this issue again but had forgotten about this issue. Was going to create another. I'll get a project up for you to reproduce within the hour. Going to just see if it's the same issue. |
@calesce New repo code is up. Vastly simplified. Everything should work. Basically it seams that the issue is when using createElement instead of JSX. |
Hmm. I think i forgot AppContainer in this version. Weird that it works and doesnt even without the container. Will add it now and see if this resolves the issue |
Done, same issue |
OK, yeah I reproduced your issue. Also, even with JSX, on the first edit after reloading the page, it is slow to update and unmounts the component. All edits after that are fast, and the component isn't re-mounted. @tyscorp's project had the same issue with |
@calesce yeah I still need to sort that out. It has to do with how jspm-devtools bundles files initially. Will be fixed as soon as I start pushing dependencies over http2 server push |
But glad you were able to reproduce. |
@calesce Any progress on this? |
@alexisvincent sorry no, not yet. When I get some extended time to look, I'll probably double check that the createElement being used is the patched version. I don't have any other leads beyond that. |
I can confirm that upon a reload, react proxy is running an update. Don't know what that means for createElement. It seems that react proxy isn't keeping the state |
This issue seems outdated, I close it, feel free to add a comment if you experienced a problem relative to jspm. |
alexisvincent/systemjs-react-hot-reloader#1
The text was updated successfully, but these errors were encountered: