Skip to content

Commit

Permalink
Use simpler component
Browse files Browse the repository at this point in the history
  • Loading branch information
timneutkens committed Oct 26, 2022
1 parent 78270ac commit 8cc4437
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/next/client/app-index.tsx
Expand Up @@ -149,13 +149,9 @@ function ServerRoot({ cacheKey }: { cacheKey: string }): JSX.Element {
return root
}

function StrictModeIfEnabled({ children }: { children: React.ReactNode }) {
return process.env.__NEXT_STRICT_MODE ? (
<React.StrictMode>{children}</React.StrictMode>
) : (
<>{children}</>
)
}
const StrictModeIfEnabled = process.env.__NEXT_STRICT_MODE
? React.StrictMode
: React.Fragment

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

0 comments on commit 8cc4437

Please sign in to comment.