benhowell / react-grid-gallery

Justified image gallery component for React
https://benhowell.github.io/react-grid-gallery/
MIT License
1.01k stars 209 forks source link

Support React 19 #375

Open IsaacInsoll opened 4 months ago

IsaacInsoll commented 4 months ago

I've upgraded to React 19 and am now getting the following error in the console with the page not rendering at all

Uncaught TypeError: Cannot read properties of undefined (reading 'ReactCurrentOwner')
    at requireReactJsxRuntime_production_min (react-grid-gallery.js?v=75288887:48:210)
    at react-grid-gallery.js?v=75288887:64:30
    at react-grid-gallery.js?v=75288887:12:70
    at node_modules/react-grid-gallery/dist/react-grid-gallery.umd.js (react-grid-gallery.js?v=75288887:13:7)
    at __require (chunk-EQCVQC35.js?v=75288887:9:50)
    at react-grid-gallery.js?v=75288887:422:16
IsaacInsoll commented 1 month ago

I'm not sure if this helps but:

I uninstalled the react-grid-gallery dependency and manually copied the src folder into my project and everything worked fine, so I believe your source code is fine but something about how this is packaged for dist is causing the problem that breaks in react 19.

ullaskunder1 commented 2 weeks ago

any other solution?