apvarun / wouter-hono

Minimalist-friendly ~1.5KB router - wouter, adapted for Hono
The Unlicense
3 stars 0 forks source link

SSR #1

Open gaetan-puleo opened 4 months ago

gaetan-puleo commented 4 months ago

I think the Router is not working on the server side.

I tried to set ssrPath nothing was rendered.

apvarun commented 4 months ago

@gaetan-puleo Can you tell me the usecase you are addressing this with? (sample repo would be best) wouter is useful only for routing in hono's client components.

gaetan-puleo commented 3 months ago

Sorry for the delay.

Wouter can used on the serverside too.

You can path a ssrPath like this

image

gaetan-puleo commented 3 months ago

It allow to support SSR and client side rendering at the same time.

gaetan-puleo commented 3 months ago

I will create a small repo to show you.

gaetan-puleo commented 3 months ago

@apvarun here the minimal repo https://github.com/gaetan-puleo/wouter-hono-ssr-not-working

I didn't try to use client side router here. It's only to show you how the SSR should works with Wouter Hono