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
Omer2y ago
Hey @jn , You can use useResource hook 🚀
const { id } = useResource();
const { id } = useResource();
https://refine.dev/docs/api-reference/core/hooks/resource/useResource/
conscious-sapphire
conscious-sapphire2y ago
D'oh! Thanks @Omer
fascinating-indigo
fascinating-indigo2y ago
Thank you for this. Really help
Omer
Omer2y ago
You're welcome! 👊