Closed finestgecko closed 1 year ago
I created a fresh project, set up everything from scratch and encountered the same problem.
I've created a repo on my profile (called ssr-test
).
Hey @joelcieslar ! Thanks for reporting this issue, I'll take a look.
I took a look at your repository. it seems you're not initializing your client-side app(app.js is empty) so react doesn't mount and that's why the button does nothing. I realize it's a little confusing that you need to do this twice, so maybe it's a good place to improve developer experience :-)
I'm new to the SSR aspect of Inertia. I followed the instructions and everything seems to work just fine, until I try to do any sort of client-side interactivity:
When I click the button, nothing happens.
This is my
ssr.tsx
file:As far as I can remember, these are the only things that I changed in
webpack.ssr.config.ts
:and for Tailwind:
The source of the page looks like this (notice
app.js
is present, as you'd expect):To me, it seems like the HTML isn't being hydrated.
I was wondering if I could get some help to figure it out.