#Reuse a route at a different url - Remix

1 messages · Page 1 of 1 (latest)

kind nimbus
#

I want to have the same logic for a route but at a different url. What's the best way to do this. Currently I've just created a new file someroute.$someparam.tsx and copied the code in there from the other file. But that's less than ideal.
Thx.

lapis hearth
#

Re export everything from the first route in the other route

empty fiber
#

export {default}, * from "...

lapis hearth
#

also the loader, action, etc.

#

I think you need two lines

#
export { default } from "path to route";
export * from "path to route";
#

the second line will not include default for some reason