Skip to content

Pre-render, preact-router and Single Page Application #465

@gbreux

Description

@gbreux

Hi guys, i'd like to ask a question about the purpose of pre-rendering in a SPA.

To make the SPA working, we need to run a server that redirect all the requests to a index.html right?
So usually we redirect requests to the root index.html file, but then prerendering becomes useless.
So if we prerender all the pages of our app, we would need to configure our server and specify what route/index.html to use for each requests. But then if we have some param url, we need to specify it as well so the server knows which index.html to serve.

This seems a little overcomplicated isn't it? It seems that SSR is an easier solution afterall..

What do you think? Am I missing something? Can it be more simple? Or maybe the only purpose of the prerendering is to build a static website?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions