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

[MasonryItem] Fix crash on unmount when using React 18 #28202

Merged
merged 1 commit into from Sep 8, 2021

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Sep 7, 2021

Bad return values for effects will crash React 18.

I think the constraint was always in place but not actively used. See reactwg/react-18#95
Update: The constraint was extended to useEffect and was always in place for useLayoutEffect.

@eps1lon eps1lon added bug 🐛 Something doesn't work component: masonry This is the name of the generic UI component, not the React module! labels Sep 7, 2021
@eps1lon eps1lon added this to the React 18 milestone Sep 7, 2021
@mui-pr-bot
Copy link

mui-pr-bot commented Sep 7, 2021

Details of bundle changes (experimental)

Generated by 🚫 dangerJS against ddc5e86

@eps1lon eps1lon merged commit 7cc75a6 into mui:next Sep 8, 2021
@eps1lon eps1lon deleted the fix/MasonryItem/void-destroy branch September 8, 2021 10:23
@oliviertassinari
Copy link
Member

@eps1lon Niice, I didn't know this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: masonry This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants