Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8cc4437

Browse files
committedOct 26, 2022
Use simpler component
1 parent 78270ac commit 8cc4437

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed
 

‎packages/next/client/app-index.tsx

+3-7
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,9 @@ function ServerRoot({ cacheKey }: { cacheKey: string }): JSX.Element {
149149
return root
150150
}
151151

152-
function StrictModeIfEnabled({ children }: { children: React.ReactNode }) {
153-
return process.env.__NEXT_STRICT_MODE ? (
154-
<React.StrictMode>{children}</React.StrictMode>
155-
) : (
156-
<>{children}</>
157-
)
158-
}
152+
const StrictModeIfEnabled = process.env.__NEXT_STRICT_MODE
153+
? React.StrictMode
154+
: React.Fragment
159155

160156
function Root({ children }: React.PropsWithChildren<{}>): React.ReactElement {
161157
React.useEffect(() => {

0 commit comments

Comments
 (0)
Please sign in to comment.