konvajs / react-konva

React + Canvas = Love. JavaScript library for drawing complex canvas graphics using React.
https://konvajs.github.io/docs/react/
MIT License
5.8k stars 260 forks source link

Log uncaught errors for React 19 #809

Closed craigspaeth closed 3 months ago

craigspaeth commented 3 months ago

I'm working on an implementation of React Server Components and I was happy to see this PR merged migrating to the new React 19 react-reconciler API. This mostly fixed my issues but I noticed errors were getting swallowed (with a onUncaughtError is undefined). This is because there's a new ReactFiberReconciler.createContainer signature with more error handling options. This PR fixes that for me by passing console.error into those options.

I'm not sure what your preferred solve for this would be but I'd be happy to take guidance and update this PR with tests to implement it.

Thank you for maintaining such a nice library!

lavrton commented 3 months ago

Looks good to me. Thanks. Released as beta tag version 19.0.0-1. Please try it.