-
Hello, I learned about wouter recently and Ive been wondering about how to approach two things.
but if im already on a ticket details page for example '/tickets/123abc' and i create a new ticket from that page
and in each page I would do this
and in all other pages
I was wondering if there was a way to do thsi with the router instead of adding it manually on each page. thank you for reading and appreciate any help |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I'm rooting for this, hope this will get resolved |
Beta Was this translation helpful? Give feedback.
-
Hi @destocot,
Could you clarify? Does it change the URL when you call Regarding layouts, we don't have first-class support for it. However, you can extend the const RouteWithLayout = ({ layout, component, ...props }) => {
const Page = component; // component names should start with capital letter in React
const Layout = layout;
return <Route {...props}><Layout><Page /></Layout></Route>
}
<RouteWithLayout path="/signin" component={SigninPage} layout={AuthLayout} /> |
Beta Was this translation helpful? Give feedback.
Hi @destocot,
Could you clarify? Does it change the URL when you call
setLocation()
?Regarding layouts, we don't have first-class support for it. However, you can extend the
Route
component like so: