Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rsc: remove router injection (#36101)
- Loading branch information
Showing
5 changed files
with
19 additions
and
14 deletions.
There are no files selected for viewing
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
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
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
12 changes: 8 additions & 4 deletions
12
test/integration/react-streaming-and-server-components/app/pages/routes/[dynamic].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 |
---|---|---|
@@ -1,7 +1,11 @@ | ||
export default function Pid({ router }) { | ||
return <div>{`query: ${router.query.dynamic}`}</div> | ||
export default function Pid({ text }) { | ||
return <div>{`query: ${text}`}</div> | ||
} | ||
|
||
export const config = { | ||
runtime: 'edge', | ||
export function getServerSideProps({ params }) { | ||
return { | ||
props: { | ||
text: params.dynamic, | ||
}, | ||
} | ||
} |
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