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

Does not work with react 16 #120

Closed
ppong opened this issue Aug 3, 2017 · 17 comments
Closed

Does not work with react 16 #120

ppong opened this issue Aug 3, 2017 · 17 comments

Comments

@ppong
Copy link

ppong commented Aug 3, 2017

I was trying to update our app to the react 16-beta.2 and react knova is running into the following error. Any help would be appreciated.

ERROR in ./~/react-konva/src/react-konva.js
Module not found: Error: Can't resolve 'react/lib/React' in '.../react-konva/src'

ERROR in ./~/react-konva/src/react-konva.js
Module not found: Error: Can't resolve 'react-dom/lib/ReactInstanceMap' in '.../react-konva/src'

ERROR in ./~/react-konva/src/react-konva.js
Module not found: Error: Can't resolve 'react-dom/lib/ReactMultiChild' in '.../react-konva/src'

ERROR in ./~/react-konva/src/react-konva.js
Module not found: Error: Can't resolve 'react-dom/lib/ReactUpdates' in '.../react-konva/src'

@igorrmotta
Copy link

got the same issue here...

@igorrmotta
Copy link

I guess there is nothing much that can be done. This library is really old and the issue is coming from the way it imports react and react-dom.

var React = require('react/lib/React');

var ReactInstanceMap = require('react-dom/lib/ReactInstanceMap');
var ReactMultiChild = require('react-dom/lib/ReactMultiChild');
var ReactUpdates = require('react-dom/lib/ReactUpdates');

@lavrton
Copy link
Member

lavrton commented Sep 18, 2017

I will clarify current situation.

react-konva depends on some React private internals. There is no way to implement react-konva with using public API only (actually there is a way, but VERY VERY slow).

I am happy to update react-konva for support of React v16. But v16 has a lot of internal changes (new Fiber reconciler). With v16, we can't use old private API and I don't see a way to use new private API.

But I am tracking status of Fiber API here: facebook/react#9103
As soon as I will have more info, I will update react-konva.

@ppong
Copy link
Author

ppong commented Sep 29, 2017

Hey @lavrton, just wondering if you had a chance to take a look at the recently released react v16. Thanks!

@lavrton
Copy link
Member

lavrton commented Sep 29, 2017

@ppong I am waiting for this issue to be resolved: facebook/react#10758
Then we can update react-konva for react v16.

@ghost
Copy link

ghost commented Oct 11, 2017

image

@ngocdaothanh
Copy link

@lavrton facebook/react#10758 has been merged. Can you update react-konva for react v16?

@Flydiverny
Copy link

Give him some time, I'm sure he's looking into it when he's available to, as he already expressed that he will. I also figure he'd need some time to figure out and rewrite stuff as react-konva can't depend on no longer existing private internals. Yes, the new reconciler package has been merged. If you are eager to get react-konva have a go at it and make a PR!

@lavrton
Copy link
Member

lavrton commented Oct 16, 2017

Current status. "React Reconciler Package" PR is merged. But react-reconciler package is not released yet in npm (just empty v0). As soon as it will be released I will start work with it.

Stay tuned and show your love. 🙌

@lavrton
Copy link
Member

lavrton commented Nov 3, 2017

react-reconciler is released.
Support for v16 is almost finished. All tests are green. 😻
Now I am going to test react-konva with the real app.
Also, I am going to release beta version. So you can test as well.

@programbo
Copy link

Great timing!

@mattblackdev
Copy link

mattblackdev commented Nov 3, 2017 via email

@lavrton
Copy link
Member

lavrton commented Nov 4, 2017

Published beta version. You can try with:

npm install react@16.1.0-beta react-dom@16.1.0-beta react-konva@1.5.5-beta

I am going to make a master release when react v16.1.0 is out.

@samkit
Copy link

samkit commented Nov 4, 2017

Awesome work! Thanks.

A small glitch, for some reason on android-chrome onClick is not working. But I am still using react 16.0.0, hope that is not the issue here.

@cesardeazevedo
Copy link

@lavrton I just did i try on my project, and everything is working perfectly, thanks for your effort.

@germanow
Copy link

germanow commented Nov 8, 2017

@lavrton add konva package in install command

npm install react@16.1.0-beta react-dom@16.1.0-beta react-konva@1.5.5-beta konva

@lavrton
Copy link
Member

lavrton commented Nov 10, 2017

I made a release 1.6.2. It should work ok with React v16.

@lavrton lavrton closed this as completed Nov 10, 2017
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

10 participants