Skip to content
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

hot-loader crashes the app #178

Closed
sehz opened this issue Aug 14, 2015 · 5 comments
Closed

hot-loader crashes the app #178

sehz opened this issue Aug 14, 2015 · 5 comments

Comments

@sehz
Copy link

sehz commented Aug 14, 2015

When I tries to use react-hot-loader, my application fails to load due to null pointer. It seems props were not properly cloned.

// code is transpiled using babel
{
key: 'viewKey',
get: function get() {
return this.props.view;
}
}]);

In our case, this.props. is null.

@Raigen
Copy link

Raigen commented Aug 19, 2015

I have the same problem with this.state to be undefined in getter when using hot-loader.
Newest version of webpack and react-hot-loader

// transpiled by babel
      _createClass(Plugin, [{
        key: 'editLabel',
        get: function get() {
          return this.state.mode === 'view' ? 'Edit' : 'Save';
        }

@gaearon
Copy link
Owner

gaearon commented Aug 22, 2015

It would actually help to see the source code, not the generated one. ;-)

@gaearon
Copy link
Owner

gaearon commented Aug 22, 2015

My guess is that you're using getters, and React Hot Loader doesn't support them yet.
Support is coming!

@gaearon
Copy link
Owner

gaearon commented Aug 22, 2015

Stay tuned for the next beta release that is going to fix it and drop very soon.

@gaearon gaearon closed this as completed Aug 22, 2015
@gaearon
Copy link
Owner

gaearon commented Aug 23, 2015

Can I ask you to check whether [email protected] solves this issue?
Please provide any feedback on it in this PR: #182

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants