-
Notifications
You must be signed in to change notification settings - Fork 26.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
test/e2e/app-dir/dynamic/app/dynamic/async-client/client-no-ssr.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
'use client' | ||
|
||
let name = await Promise.resolve('async') | ||
|
||
export default (props) => { | ||
return <button {...props}>this is an {name} client button</button> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
'use client' | ||
|
||
let name = await Promise.resolve('async') | ||
|
||
export default (props) => { | ||
return <button {...props}>this is an {name} client button with SSR</button> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import dynamic from 'next/dynamic' | ||
|
||
const Client1 = dynamic(() => import('./client')) | ||
const Client2 = dynamic(() => import('./client-no-ssr'), { ssr: false }) | ||
|
||
export default function Page() { | ||
return ( | ||
<> | ||
<Client1 id="client-button" /> | ||
<Client2 id="client-button-no-ssr" /> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters