Hi, How can I access the URL parameter?

Hi, I'm trying to access the URL parameter in the 1st SS. It'll be used to fetch data. I've tried useParams from the react-router. It isn't working. I've tried to use the useParsed from refine-core. that isn't working either. the id from both returns as undefined. I've attached all the Screenshots of my resources, and routes.
No description
No description
No description
No description
No description
6 Replies
kapa.ai
kapa.ai15mo ago
Hey @thalfpant! I'm the kapa.ai support bot. I've searched through the docs to try to answer your question. :wave:
kapa.ai
kapa.ai15mo ago
---------------------- Hmm, I don't know enough to give you a confident answer yet. However, you can refer to the useParsed documentation (https://refine.dev/docs/api-reference/core/hooks/navigation/useParsed) for more information on how to access URL parameters using refine. ----------------------
useParsed | refine
useParsed is a hook that leverages the parse method of the routerProvider to access the URL and query parameters along with the inferred resource, action and id from the URL.
kapa.ai
kapa.ai15mo ago
<@439051486597611531> kapa.ai is still learning and improving, please let us how it did by reacting below
conscious-sapphire
conscious-sapphire15mo ago
<Route path="edit/:id" element={EditVCard} when you change :url to :id, is it work ?
multiple-amethyst
multiple-amethyst15mo ago
damn..... It worked! I'm really sorry. Bad mistake on my part. Thank you very much.
conscious-sapphire
conscious-sapphire15mo ago
I'm glad to hear that 🚀