Skip to content

Use isomorphic layout effect in useIsMounted - #1452

Merged
mattgperry merged 1 commit into
motiondivision:mainfrom
thebuilder:fix/layout-effect
Feb 13, 2022
Merged

Use isomorphic layout effect in useIsMounted#1452
mattgperry merged 1 commit into
motiondivision:mainfrom
thebuilder:fix/layout-effect

Conversation

@thebuilder

Copy link
Copy Markdown
Contributor

The React 18 upgrade in #1438 introduced a new useIsMounted hook, that that didn't use the useIsomorphicLayoutEffect. This resulted in a warning rendered serverside. Fix by replacing useLayoutEffect with useIsomprohicLayoutEffect.

Fix: #578

@mattgperry

Copy link
Copy Markdown
Collaborator

Brilliant thanks for the contribution! I’m OOO until a week on Monday but will publish then

@peterje

peterje commented Feb 18, 2022

Copy link
Copy Markdown

Will this be added in v. 6.2.7?

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 this pull request may close these issues.

[BUG] useLayoutEffect warning when rendering serverside

3 participants