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

Make React Konva compatible with React v17 #508

Merged
merged 2 commits into from
Aug 28, 2020

Conversation

alexkuz
Copy link
Contributor

@alexkuz alexkuz commented Aug 13, 2020

This is a draft PR for future React release.

Tests don't work since Enzyme is not supporting React v17 yet (and probably won't support until the release). Still, it would be nice to publish this as next version or something.

@alexkuz alexkuz marked this pull request as draft August 13, 2020 12:38
@damiangreen
Copy link

@alexkuz will this PR fix this issue?
#171

@alexkuz
Copy link
Contributor Author

alexkuz commented Aug 28, 2020

@damiangreen it should, yes. I think I've seen this one.

@damiangreen
Copy link

ok cool, this is one of only 2 libraries that dont work in our large scale app with React 17, so maybe i can use your fork

@lavrton lavrton merged commit 2de95c8 into konvajs:master Aug 28, 2020
@lavrton
Copy link
Member

lavrton commented Aug 28, 2020

Try with npm install [email protected].

@Siva-at-OFS
Copy link

I recently upgraded react version to 17.0.0 and found that [email protected] is still not responding to clicks...

I'm using Stage, Layer, Group, Rect, Text APIs from react-konva.

No error thrown and mouse clicks are still not detected.

The idea is to create a small rectangle like shape with specific text inside on mouse click at specific region of document.

image

I tried to use normal html canvas with javascript and the click function is working and I'm able to send the required clientX,clientY data to backend and other portions of the UI are responding to click event.

But we couldn't see the "textfield" or "signature" rectangles (shown in the above image) appearing on click and its having an adverse impact on mobile UI where the client is expected to sign at chosen locations.

Any suggestions?

@lavrton
Copy link
Member

lavrton commented Dec 19, 2021

@Siva-at-OFS make a small online demo.

@Siva-at-OFS
Copy link

Siva-at-OFS commented Dec 20, 2021

@lavrton , Here are the old and new versions being used with the same code..

Old versions:
Konva ~2.0.2
React-konva ~1.7.2
React ~16.3.2
React-dom ~16.3.2

New versions:
Konva ~8.3.0
React-konva ^17.0.0.rc.1
React ~17.0.0
ReactDom ~17.0.2

Click the below 👇 link for comparison of behaviour.
https://youtu.be/Gqm-2RvSYIM

I tried to use do things without using a library... Was able to send relevant data to backend but the feature in not working properly on mobile (which is a native Android application)

@lavrton
Copy link
Member

lavrton commented Dec 20, 2021

I am sorry, I can't debug from the video. By the demo, I mean a small code example that work in unexpected way. A link to https://codesandbox.io/

@Siva-at-OFS
Copy link

@lavrton , Sorry about that. I was also thinking what good is the video demo... Will try to create a sample code in codesandbox.

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

Successfully merging this pull request may close these issues.

4 participants