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

Fall back to ReactUpdateQueue on 0.13 components #5

Closed
luigy opened this issue Feb 16, 2015 · 6 comments
Closed

Fall back to ReactUpdateQueue on 0.13 components #5

luigy opened this issue Feb 16, 2015 · 6 comments

Comments

@luigy
Copy link

luigy commented Feb 16, 2015

Thoughts on fallback to ReactUpdateQueue.enqueueForceUpdate on react-0.13 components not created using React.createClass and that don't extend React.Component?
Here is an example using a patched loader and api that uses the fallback

@gaearon
Copy link
Owner

gaearon commented Feb 16, 2015

We can do that! Is it needed? I think I had non-React.Component classes updating correctly in 0.13, but maybe I made a mistake while testing.

@luigy
Copy link
Author

luigy commented Feb 16, 2015

Strange, this is not working for me. This is where I'm using ReactUpdateQueue for my 0.13 components that don't have a forceUpdate. Also, I believe it should be skipping autobinding methods for 0.13 components.
I imagine in the future forceUpdate being exposed like they have done with getDOMNode and
expect render to have props passed in on 0.14 🙌

@gaearon
Copy link
Owner

gaearon commented Feb 16, 2015

It skips autobinding in the method itself, I believe.

Is your solution backwards-compatible with 0.12? Can you send a PR?

@gaearon gaearon closed this as completed in 9c9c416 Mar 9, 2015
@gaearon
Copy link
Owner

gaearon commented Mar 9, 2015

This will be fixed in react-hot-loader@1.2.0 which will be released soon.

@gaearon
Copy link
Owner

gaearon commented Mar 9, 2015

Fixed and released. Can you please verify it works for you?

@luigy
Copy link
Author

luigy commented Mar 9, 2015

Yes, lgtm 😄

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

2 participants