#is there way to get the route Id inside loader

1 messages · Page 1 of 1 (latest)

strong lodge
#

on example

const routeId = appContext.routeId // `products.$slug`
fierce basalt
strong lodge
#

Hi, Thanks for reply, sorry but I what I need to be returned is

products.$slug

fierce basalt
#

let me see if I get this, you want to have something like /products/blue-tshirt as your route instead of /products/1234? or to return the product slug from the loader if you know the productId ?

strong lodge
#

i want to get the route id that defined in the page file name, if the page file named product.$slug.tsx I want to get route id of product.$slug