You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I just wanted to clue you in on the fact that preact-router doesn't really work when server rendering. I've been looking around for how to do it, and it doesn't seem like it's supported. You'll notice when you open your app at the "/about" route, that the server renders the "/" route, and then javascript on the client goes ahead and changes it. So the about page is never rendered on the server, which kind of defeats the purpose of ssr.
I made the same mistake since it's hard to notice that anything is out of order.
I think the best way to do ssr with preact is to just stick with good old react-router.
The text was updated successfully, but these errors were encountered:
Hey, I just wanted to clue you in on the fact that preact-router doesn't really work when server rendering. I've been looking around for how to do it, and it doesn't seem like it's supported. You'll notice when you open your app at the "/about" route, that the server renders the "/" route, and then javascript on the client goes ahead and changes it. So the about page is never rendered on the server, which kind of defeats the purpose of ssr.
I made the same mistake since it's hard to notice that anything is out of order.
I think the best way to do ssr with preact is to just stick with good old react-router.
The text was updated successfully, but these errors were encountered: