If I want to get data from URL in component #9881
Unanswered
WreewanMorhee
asked this question in
Q&A
Replies: 1 comment 3 replies
-
This is what I use depending on the origin of the data and where I’m accessing it https://sergiodxa.com/tutorials/access-loaders-data-in-remix For your specific question about a component accessing route data, it depends if the component is shared between routes (use props) or unique to the route (use hook) |
Beta Was this translation helpful? Give feedback.
3 replies
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.
-
If I want to get data from URL in component ( not route component but other component )
It's better to pass from loader then pass to child
or
child use hooks to get it ? ( like useLocation, useParams )
I know both is okay
but I want to know which is better in Remix
Beta Was this translation helpful? Give feedback.
All reactions