extended-yellow
extended-yellow•2y ago

Accessing Id from Show page without triggering request

I have a simple show page and want to use useCustom to make the request (complex url) rather than useShow. How can I just simply access the Id parameter from with the show page? If I use useShow it triggers the request automatically. I'm calling the show page like this from useNavigation: onRowClick={(row) => show("<resource>", row.id)}
4 Replies
Omer
Omer•2y ago
Hey @jn , You can use useResource hook 🚀
const { id } = useResource();
const { id } = useResource();
https://refine.dev/docs/api-reference/core/hooks/resource/useResource/
extended-yellow
extended-yellow•2y ago
D'oh! Thanks @Omer
jolly-crimson
jolly-crimson•2y ago
Thank you for this. Really help
Omer
Omer•2y ago
You're welcome! 👊