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

Example breaks down, because React 16 have no react/lib/* #891

Closed
suhaotian opened this issue Sep 27, 2017 · 5 comments
Closed

Example breaks down, because React 16 have no react/lib/* #891

suhaotian opened this issue Sep 27, 2017 · 5 comments

Comments

@suhaotian
Copy link

suhaotian commented Sep 27, 2017

This example import update from react/lib/.

But in react 16 blog post:

There is no react/lib/* and react-dom/lib/* anymore

@darthtrevino
Copy link
Member

Yeah, my bad. That should be fixed in master now

@gazpachu
Copy link

gazpachu commented Apr 5, 2018

Sorry, so what's the solution for this? Do I have to use https://www.npmjs.com/package/react-addons-update or is there another way of doing it? I had a look at the example but I couldn't find it. Thanks in advance!

@daniula
Copy link

daniula commented May 29, 2018

For those who are upgrading from React 15 to React 16, used one of the deprecated examples in their code and end up here looking for help. The solution is simply to replace:
import update from 'react/lib/update'; with import update from 'immutability-helper';

@icehongssii
Copy link

USING
"ajv": "^6.5.3", "react": "^16.5.2", "react-dnd": "^5.0.0", "react-dnd-html5-backend": "^5.0.1", "react-dom": "^16.5.2", "react-scripts": "1.1.5"

However
import update from 'immutability-helper';
does no longer work

@icehongssii
Copy link

had to install new package. if there's a better way to fix it, I would love to know. thanks
https://stackoverflow.com/questions/41677407/react-lib-update-multiple-splices-multiple-indexes

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

5 participants