Skip to content

Commit

Permalink
Slightly better ssr example
Browse files Browse the repository at this point in the history
  • Loading branch information
rmarscher committed May 12, 2024
1 parent 8e09660 commit e900cf8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion apps/next/app/ssr/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ import { SSRTestScreen } from './screen'
export const runtime = 'edge'

export default function Page() {
return <SSRTestScreen></SSRTestScreen>
const content = 'This page is rendered on the edge. It is not statically rendered.'
return <SSRTestScreen content={content}></SSRTestScreen>
}
4 changes: 2 additions & 2 deletions apps/next/app/ssr/screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import { Paragraph, YStack } from '@t4/ui'

export function SSRTestScreen() {
export function SSRTestScreen(props: { content: string }) {
return (
<YStack flex={1}>
<Paragraph role='heading'>
This page is rendered on the edge. It is not statically rendered.
{props.content}
</Paragraph>
</YStack>
)
Expand Down

0 comments on commit e900cf8

Please sign in to comment.