dustingetz / react-cursor

Immutable state for React.js
1.03k stars 50 forks source link

Enjoy separated addons - react-addons-update #67

Closed lijunle closed 8 years ago

lijunle commented 8 years ago

As of React 0.14, each addon is moved to separated package, in this project, install react-addons-update separatedly and enjoy it.

This is one more step to decouple with React. :tada: :tada: :tada: :tada:

dustingetz commented 8 years ago

Thanks, is there a deprecation warning or is this breaking react-cursor with react 14 right now?

lijunle commented 8 years ago

From source:

However, React.render is deprecated, and moved to another package react-dom. Consider to update the PR about decouple React.

dustingetz commented 8 years ago

I want both branches of react-cursor (master branch, and the experimental refcursor branch) to work with React 13 - so if nothing is broken, i want to wait a few weeks to address this.

lijunle commented 8 years ago

Which is your experimental refcursor branch?

dustingetz commented 8 years ago

https://github.com/dustingetz/react-cursor/tree/djg/53

lijunle commented 8 years ago

BTW, React declared that, props is frozen and cannot be mutated.

The props object is now frozen, so mutating props after creating a component element is no longer supported. In most cases, React.cloneElement should be used instead. This change makes your components easier to reason about and enables the compiler optimizations mentioned above.

I don't know how they can do it. Please investigate more to support #54.

nuclearspike commented 8 years ago

Dustin, I'm interested in trying this project out, but I am interested to know how big of an update it will take to have it work with 0.14 now that props are frozen.

dustingetz commented 8 years ago

Hi Paul - react-cursor does not mutate props, so props being frozen has no effect

nuclearspike commented 8 years ago

Cool. Thanks for the speedy reply!

dustingetz commented 8 years ago

Fixed in 2.0-apha.4

dustingetz commented 8 years ago

Our react dependency is now encapsulated by https://github.com/dustingetz/update-in