aweary / react-copy-write

✍️ Immutable state with a mutable API
MIT License
1.79k stars 54 forks source link

Use create-react-context #49

Closed pedronauck closed 6 years ago

pedronauck commented 6 years ago

Add create-react-context in order to guarantee compatibility with old versions of React

renatorib commented 6 years ago

I think this PR is extremely important. I had problems trying to use a lib that had copy-write as dependency, in my application with react < 16.3

aweary commented 6 years ago

Hmm, I didn't intend to support older versions of React, but I didn't consider transitive dependencies.

renatorib commented 6 years ago

I think ok not to consider 15.x and older versions, but 16 to 16.2 is too recent to be ignored. IHMO

Anyway, I think it's important to make it clear that if people are using react-copy-write in their libs they are no longer supporting previous versions of the react. It is information that can go unnoticed.

pedronauck commented 6 years ago

We're using react-copy-write on docz and now has a bunch of projects with this bug, if you won't consider support to use create-react-context unfortunately I gonna have to change and use another state management, it's a really bad thing since I really like your package 😕

aweary commented 6 years ago

Ok, Im happy to support this in that case. I'll get out a release with this fix soon!

pedronauck commented 6 years ago

Really? Great, thanks so much @aweary 🙏

aweary commented 6 years ago

I've published 0.8.0 with this change. Thanks for bringing this up @pedronauck!

pedronauck commented 6 years ago

Great @aweary, thank you so much, I'll update our version on docz to ship it Monday with the new release v0.10.0 🙏