boblauer / react-onclickout

An ES6-friendly on-click-outside React component.
MIT License
92 stars 14 forks source link

Add support for React 0.14 #3

Closed razh closed 9 years ago

razh commented 9 years ago

This converts the following calls to use react-dom (which is added as a peer-dependency):

React.render()
React.findDOMNode()
React.unmountComponentAtNode()

All tests are passing on my machine with Node v0.10.9. The only issue is the warning for rendering into document.body added in 0.14.

Warning: render(): Rendering components directly into document.body is discour
aged, since its children are often manipulated by third-party scripts and brow
ser extensions. This may lead to subtle reconciliation issues. Try rendering i
nto a container element created for your app.
boblauer commented 9 years ago

Thanks for this. I haven't looked into React 0.14 much yet, but do you know if it's possible to maintain support for React 0.13 and 0.14 at the same time? If I accept this pull request, it will break for everyone using 0.12 or 0.13. I suppose I could maintain two separate branches, but I would prefer to avoid that if at all possible.

razh commented 9 years ago

It's definitely an issue. I've only seen major-version bumps from other libraries.

There's no rush though. React 0.14 only warns about not using react-dom right now.

ovaris commented 9 years ago

Why not just relase a new version that uses react-dom? User's with React 0.13 can stick with the old version and users with React 0.14 can use latest?

boblauer commented 9 years ago

@ovaris It looks like that's what I'll have to do. I'll try to get that out today or tomorrow.

ovaris commented 9 years ago

Great, many thanks!

boblauer commented 9 years ago

@ovaris @razh published on npm @2.0.0. Thanks for the pull!