react-konva icon indicating copy to clipboard operation
react-konva copied to clipboard

React 19 Upgrade

Open jackpope opened this issue 9 months ago • 8 comments

As described in https://github.com/konvajs/react-konva/issues/799, React 19 has some breaking changes that will require updates from third-party rendering libraries. I needed to get a new build of react-konva with React 19 working and I wanted to publish the updates here to share the required changes. Hopefully for a new release to go with React 19!

Changes in this PR

  • Upgrade its-fine
  • Add new reconciler methods to host config
  • Update signature of commitUpdate
  • Use React.act instead of timeouts in tests

jackpope avatar May 07 '24 20:05 jackpope

Thank you so much for your Pull Request. I will review it soon. Usually, I prefer to publish a new version AFTER a new react version is published.

lavrton avatar May 10 '24 14:05 lavrton

I tried to use the patch in my react-konva based app (that also uses react-konva-utils).

I came across the same issues in react-konva-utils (at least I got similar errors messages). So we will probably need the same type of workaround there,

rjungbeck avatar May 17 '24 08:05 rjungbeck

I'm struggling getting this working on my own. I tried downloading the package, building it, and using that to patch package the current version... but I keep hitting this error:

TypeError: Cannot read properties of undefined (reading 'ReactCurrentOwner')

@jackpope would you be so kind as to publish a version of this as a package?

PupoSDC avatar May 21 '24 13:05 PupoSDC

I can publish it as beta release. Will do this a bit later.

On Tue 21 May 2024 at 8:13 PupoSDC @.***> wrote:

I'm struggling getting this working on my own. I tried downloading the package, building it, and using that to patch package the current version... but I keep hitting this error:

TypeError: Cannot read properties of undefined (reading 'ReactCurrentOwner')

@jackpope https://github.com/jackpope would you be so kind as to publish a version of this as a package?

— Reply to this email directly, view it on GitHub https://github.com/konvajs/react-konva/pull/802#issuecomment-2122611012, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALAL6CHT5WGVX7JEOAOH5DZDNCA3AVCNFSM6AAAAABHLVN4GCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRSGYYTCMBRGI . You are receiving this because you commented.Message ID: @.***>

lavrton avatar May 21 '24 13:05 lavrton

I released 19.0.0-0. Try it.

lavrton avatar May 21 '24 15:05 lavrton

@jackpope I had some issues with npm run build. Do you have time to take a look? I temporarily removed the usage of NoEventPriority.

lavrton avatar May 21 '24 15:05 lavrton

First testing looks like this is working. Thank you very much for this intermediate release. I will be testing it a bit more thoroughly in the coming days!

PupoSDC avatar May 22 '24 00:05 PupoSDC

Anyone else getting this in the newer versions?

TypeError: reactDom.findDOMNode is not a function

Micnubinub avatar Jun 06 '24 11:06 Micnubinub

I'm struggling getting this working on my own. I tried downloading the package, building it, and using that to patch package the current version... but I keep hitting this error:

TypeError: Cannot read properties of undefined (reading 'ReactCurrentOwner')

@jackpope would you be so kind as to publish a version of this as a package?

Running into the same thing with the following:

    "konva": "^9.3.15",
    "react": "^19.0.0-rc-1460d67c-20241003",
    "react-dom": "^19.0.0-rc-1460d67c-20241003",
    "react-konva": "^19.0.0-1",
    "react-konva-utils": "^1.0.6",

Is there something I am missing?

lukedukeus avatar Oct 07 '24 17:10 lukedukeus