File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
packages/documentation/src/components/Layout Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 11import type { ReactElement , ReactNode } from "react" ;
2- import { useEffect , useRef , useState , useLayoutEffect } from "react" ;
2+ import { useEffect , useRef , useState } from "react" ;
33import type { ConfiguredIcons } from "@react-md/icon" ;
44import type { LayoutConfiguration } from "@react-md/layout" ;
55import {
@@ -25,6 +25,7 @@ import {
2525import type { MenuConfiguration } from "@react-md/menu" ;
2626import { useCrossFadeTransition } from "@react-md/transition" ;
2727import type { AppSizeListenerProps } from "@react-md/utils" ;
28+ import { useIsomorphicLayoutEffect } from "@react-md/utils" ;
2829
2930import type { CodePreference } from "components/CodePreference" ;
3031import { CodePreferenceProvider } from "components/CodePreference" ;
@@ -95,7 +96,7 @@ export default function Layout({
9596
9697 const prevPathname = useRef ( pathname ) ;
9798 const { elementProps, transitionTo } = useCrossFadeTransition ( ) ;
98- useLayoutEffect ( ( ) => {
99+ useIsomorphicLayoutEffect ( ( ) => {
99100 if ( prevPathname . current === pathname ) {
100101 return ;
101102 }
You can’t perform that action at this time.
0 commit comments