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

Library doesn't work (crashes) in newer versions of react

Open DoronTorangy opened this issue 4 years ago • 11 comments
trafficstars

This happens when running every example in the "showcase" pages using these versions: muuri: 0.9.3 react: 17.0.1 react-dom: 17.0.1 muuri-react: 3.1.6

Untitled

DoronTorangy avatar Jan 16 '21 15:01 DoronTorangy

Do we know what version it last ran at? I've run into this issue as well but downgrading didn't seem to have any effect.

benbourgeois-92 avatar Apr 10 '21 15:04 benbourgeois-92

I have this issue with the latest of React and NextJS too

albiesoft avatar Apr 19 '21 09:04 albiesoft

Im having the same issue with: "muuri": "^0.8.0", "muuri-react": "^3.1.6", "react": "^17.0.2", "react-dom": "^17.0.1", image

with this versions works fine: "muuri": "^0.9.3", "muuri-react": "^3.1.6", "react": "^16.14.0", "react-dom": "^16.13.1",

ingcarlostello avatar May 09 '21 22:05 ingcarlostello

Any updates on this problem?

alexandrsek avatar Jul 01 '21 10:07 alexandrsek

Also would love for an update here. We really like the library but it blocks us from upgrading to react 17

christofflueck avatar Jul 19 '21 08:07 christofflueck

Created a quick fix: https://github.com/mrtijn/muuri-react

yarn add mrtijn/muuri-react#master

Seems to working fine, tests are succeeding.

Will try to create a PR here later.

mrtijn avatar Jul 21 '21 13:07 mrtijn

Created a quick fix: https://github.com/mrtijn/muuri-react

yarn add mrtijn/muuri-react#master

Seems to working fine, tests are succeeding.

Will try to create a PR here later.

I tried your fork with quick fix, everything worked pretty well until I wanted to add more items or remove some of them. So basically when children array changes Muuri Component doesn't update as intended.

For example, I have an array with 9 items. I add another item to array. Now children array contains 10 components, but MuuriComponent has only 9 Muuri Items. The new child is rendered, but styles are not applied and its not registered in Muuri grid.

I found a workaround for this by updating MuuriComponent key prop so it forces re-render, but it looks really bad with all that flickering and layout jumping.

Any ideas how to fix this?

Anyway, thank you for your help!

alexandrsek avatar Jul 29 '21 16:07 alexandrsek

Opened a PR for this. Ah @mrtijn just noticed you already found the same fix! Oh well, glad it's working.

marcelchastain avatar Sep 01 '21 23:09 marcelchastain

Cool, forgot to create a PR 😅 Hope this can be merged soon!

mrtijn avatar Sep 03 '21 11:09 mrtijn

Hey, any progress on this issue. I patched my react 17 instance successfully via patch-package and the linked PR

joernroeder avatar Mar 02 '22 08:03 joernroeder

Hello everyone, unfortunately muuri-react has not been updated for several years and there has been no community action, the muuri-react example no longer works on the latest version of React, so I have rebuilt a library muuri for react that does not depend on any version of React or muuri, depending on the version of your project depending on the version of

If you want to run muuri in React 17 or React 18, you can try this library

Happy coding!

vingeraycn avatar Apr 26 '22 06:04 vingeraycn

Screenshot from 2022-09-27 16-18-02

i'm having this issue when i start dragging. Sometimes it will create duplicate items

"muuri": "^0.9.3", "muuri-react": "^3.1.6", "react": "^16.8", "react-dom": "^16.8",

Hussain-webonise avatar Sep 27 '22 11:09 Hussain-webonise

same issue

Mohamed-Raid avatar Sep 13 '23 09:09 Mohamed-Raid