AK
Different routes using different layouts, while doing file based routing please?
i didn't see it mentioned in the articles (maybe it's not recommended?). the approach i've used is:
<Router>
<Route path="/" component={Home}>
<Route path="/" component={LandingPage} />
<Route path="/login" component={Login} />
</Route>
</Router>
in my Home component I have the line below where I want the children to be:
<div>{props.children}</div>
You can create multiple group like this
12 replies
SSG / Partial Hydration
Thank you so much for digging into it. I'll look at partial hydration.
On the symmetry part, for what it's worth, I added <Button/> in the home.jsx (so it's rendered on the server side too). The server rendered and the one hydrated on are the same with the exception of data-hk attribute. the server rendered has the attribute. the hydrated doesn't.
I'll look at link you sent. thanks.
21 replies
SSG / Partial Hydration
use "npm run preview" to build and see the results. the button is not included in the initial Home.jsx file, instead there is a div placeholder but when the page loads, it properly renders it in the placeholder. but if i click it, nothing in the console
21 replies