Get the Request URL in an RSC Component #14338
Unanswered
brynshanahan
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have an async Header RSC component that wants to get the page for a request URL and render it's title. How can I get the path of the request in an server component so I can get the relevant page/title from my database?
I've had a look at adding some AsyncLocalStorage in my
vite.ssr.entry
andvite.rsc.entry
but it doesn't appear to be getting through to my component (I'm guessing the async context closes too quickly because it immediately returns a stream)Tagging you @sergiodxa because I've seen you mentioning around that this could be possible
Beta Was this translation helpful? Give feedback.
All reactions