grab dynamic path segment from props #268
juliusmarminge
started this conversation in
Ideas
Replies: 2 comments 1 reply
-
We already pass |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
The current way of grabbing dynamic path segment doesn't provide a very nice DX since we need to do erronous error checking that isn't needed:
I've noticed this when trying out the new app-dir in Next.js 13 too:
compared to the old way using the router hook in the pages directory:
Would it be possible for expo router to pass the segment through props, the only thing we get back now is just a static
/post/[id]
without the actual id:Not sure what this would even be useful for?
Minimal reproducible example
https://github.com/t3-oss/create-t3-turbo/blob/main/apps/expo/app/post/%5Bid%5D.tsx
Beta Was this translation helpful? Give feedback.
All reactions