Skip to content

Commit f60607a

Browse files
authored
fix #845 [useLayoutEffect warning on the server side rendering with nextjs] (#846)
1 parent b8e82d2 commit f60607a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ContextSelector/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export function useContextSelector<T, O>(holder: ReturnCreateContext<T>, selecto
5555

5656
const [value, setValue] = React.useState(() => eventSelector(context ? getValue() : null));
5757

58-
React.useLayoutEffect(() => {
58+
useLayoutEffect(() => {
5959
if (!context) {
6060
return;
6161
}

0 commit comments

Comments
 (0)