Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

fixing React Hot Loader by copying methods across to top level prototype #255

Merged
merged 1 commit into from
Jul 13, 2015

Conversation

bobbyrenwick
Copy link
Contributor

Let's hope second time around I've actually solved this...

This is solution 2 from @gaearon's suggestions. #252 needs to be closed because I couldn't find any way to resolve facebook/react#3316 and the differences between setting the state in ES6 classes vs React.createClass without doing something similar to the current master branch.

Given that the code was heading back in that direction, I opted for just exposing all methods on the Component's prototype that haven't already been overwritten by the subclass. I liked the suggestion of only doing this in dev too, so I've sorted that too.

Example of it here - https://github.com/bobbyrenwick/react-hot-boilerplate/tree/test-radium-hoc-2

@ianobermiller
Copy link
Contributor

:D Thanks @bobbyrenwick

ianobermiller added a commit that referenced this pull request Jul 13, 2015
fixing React Hot Loader by copying methods across to top level prototype
@ianobermiller ianobermiller merged commit 82bb1e7 into FormidableLabs:master Jul 13, 2015
AnSavvides pushed a commit to AnSavvides/radium that referenced this pull request Aug 11, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calling setState without getInitialState throws when using PureRenderMixin
2 participants