-
Notifications
You must be signed in to change notification settings - Fork 27k
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
5 changed files
with
132 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
...ion/react-streaming-and-server-components/switchable-runtime/pages/node-rsc-ssg.server.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,26 @@ | ||
import getRuntime from '../utils/runtime' | ||
import getTime from '../utils/time' | ||
|
||
export default function Page({ type }) { | ||
return ( | ||
<div> | ||
This is a {type} RSC page. | ||
<br /> | ||
{'Runtime: ' + getRuntime()} | ||
<br /> | ||
{'Time: ' + getTime()} | ||
</div> | ||
) | ||
} | ||
|
||
export function getStaticProps() { | ||
return { | ||
props: { | ||
type: 'SSG', | ||
}, | ||
} | ||
} | ||
|
||
export const config = { | ||
runtime: 'nodejs', | ||
} |
26 changes: 26 additions & 0 deletions
26
...ion/react-streaming-and-server-components/switchable-runtime/pages/node-rsc-ssr.server.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,26 @@ | ||
import getRuntime from '../utils/runtime' | ||
import getTime from '../utils/time' | ||
|
||
export default function Page({ type }) { | ||
return ( | ||
<div> | ||
This is a {type} RSC page. | ||
<br /> | ||
{'Runtime: ' + getRuntime()} | ||
<br /> | ||
{'Time: ' + getTime()} | ||
</div> | ||
) | ||
} | ||
|
||
export function getServerSideProps() { | ||
return { | ||
props: { | ||
type: 'SSR', | ||
}, | ||
} | ||
} | ||
|
||
export const config = { | ||
runtime: 'nodejs', | ||
} |
26 changes: 26 additions & 0 deletions
26
test/integration/react-streaming-and-server-components/switchable-runtime/pages/node-ssg.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,26 @@ | ||
import getRuntime from '../utils/runtime' | ||
import getTime from '../utils/time' | ||
|
||
export default function Page({ type }) { | ||
return ( | ||
<div> | ||
This is a {type} page. | ||
<br /> | ||
{'Runtime: ' + getRuntime()} | ||
<br /> | ||
{'Time: ' + getTime()} | ||
</div> | ||
) | ||
} | ||
|
||
export function getStaticProps() { | ||
return { | ||
props: { | ||
type: 'SSG', | ||
}, | ||
} | ||
} | ||
|
||
export const config = { | ||
runtime: 'nodejs', | ||
} |
26 changes: 26 additions & 0 deletions
26
test/integration/react-streaming-and-server-components/switchable-runtime/pages/node-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,26 @@ | ||
import getRuntime from '../utils/runtime' | ||
import getTime from '../utils/time' | ||
|
||
export default function Page({ type }) { | ||
return ( | ||
<div> | ||
This is a {type} page. | ||
<br /> | ||
{'Runtime: ' + getRuntime()} | ||
<br /> | ||
{'Time: ' + getTime()} | ||
</div> | ||
) | ||
} | ||
|
||
export function getServerSideProps() { | ||
return { | ||
props: { | ||
type: 'SSR', | ||
}, | ||
} | ||
} | ||
|
||
export const config = { | ||
runtime: 'nodejs', | ||
} |
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