S
SolidJS•2y ago
lars

parent route with redirect (solid-router)?

is there a way to define a parent route that redirects to a child route? eg. say with the below route config, is there a way to set up a redirect from /home -> /home/browse?
<Route path="/home" component={Home}>
<Route path="/browse" component={Browse} />
<Route path="/projects" component={Projects} />
</Route>
<Route path="/home" component={Home}>
<Route path="/browse" component={Browse} />
<Route path="/projects" component={Projects} />
</Route>
2 Replies
mdynnl
mdynnl•2y ago
<Route path="/" element={<Navigate href="browse" />} /> this code should be self explanatory
lars
larsOP•2y ago
late reply, but thank you!! @mdynnl 👌
Want results from more Discord servers?
Add your server