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

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

Closed
DoronTorangy opened this issue Jan 16, 2021 · 13 comments · Fixed by #60
Closed

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

DoronTorangy opened this issue Jan 16, 2021 · 13 comments · Fixed by #60

Comments

@DoronTorangy
Copy link

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

@benbourgeois-92
Copy link

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.

@albiesoft
Copy link

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

@ingcarlostello
Copy link

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",

@alexandrsek
Copy link

Any updates on this problem?

@christofflueck
Copy link

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

@mrtijn
Copy link

mrtijn commented Jul 21, 2021

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.

@alexandrsek
Copy link

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!

@marcelchastain
Copy link
Contributor

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

@mrtijn
Copy link

mrtijn commented Sep 3, 2021

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

@joernroeder
Copy link

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

@vingeraycn
Copy link

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!

@Hussain-webonise
Copy link

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",

@Mohamed-Raid
Copy link

same issue

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 a pull request may close this issue.