vaadin / hilla

Build better business applications, faster. No more juggling REST endpoints or deciphering GraphQL queries. Hilla seamlessly connects Spring Boot and React to accelerate application development.
https://hilla.dev
Apache License 2.0
906 stars 57 forks source link

Prerendering Routes #367

Open JustinVoitel opened 2 years ago

JustinVoitel commented 2 years ago

An awesome feature of Hilla would be the pre-rendering of routes into static html pages.

With other frontend frameworks like Next, Nuxt or SvelteKit this is already possible and used by many people for static content like Homepages or blogs.

Is this feature already considered, Or is it simply not possible due to the nature of how web components work?

An answer would be appreciated:)

platosha commented 2 years ago

Hi, thanks for the idea! We haven’t considered this feature so far.

We found, there are ways to do that with web components, now that declarative shadow roots are already shipped in Chrome. It is not impossible then.

This would be low in our priorities, as we generally focus on enterprise applications, where most of the content is likely not indexable / behind a login form anyway.

Let me keep this issue open though for discussing use cases.

JustinVoitel commented 2 years ago

@platosha Hi thanks for your reasonable answer!

For our use case we wanted to create our new company homepage with hilla, since all of our components and design system lives there already which we use for our flow apps.

To have the fastest experience and to save API calls, SSG would have been great but now we might consider using Astro since it also has lit support.