#default route
1 messages · Page 1 of 1 (latest)
create an index file nested inside the parent route, export a loader and redirect the user to some other specific child route
// routes/parent/index.tsx
export async function loader() {
return redirect("/parent/child")
}
oooh I was almost there, was trying to use relative url though like redirect("./general")
sadly redirect doesn't support relatives URLs
this is an HTTP limit
redirects need the full URL or at least an absolute one for the current host
ok I was confused with the "to" attribute on Links, got it.
OT: how do you put code snippets in a discord message? ^^'
using the ` character three times
after the third one you can include the language like ts
Does ‘Link’ support relative paths in Remix?
Yea
Can we use a react-router hook? useResolvedPath maybe?