Skip to content

Serving prerendered (static) pages during frontend compilation #5252

@larsblumberg

Description

@larsblumberg

Describe the Features

Instead of having a page render its React components only client-side, there's a new option to serve a page pre-rendered.

What is the purpose of the feature?

SEO

Show an example / use cases for the new feature.

During frontend compilation time pages get firstly compiled to React code and then also rendered. So that when a page is served it already contains the rendered HTML elements. So that search engines can crawl content w/o executing javscript.

In a 1st iteration this could be implemented for pages which do not need any state for rendering. So that at least landing pages get served w/o the need for executing javascript.

React seems to provide the means for that: https://react.dev/reference/react-dom/static/prerender

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestA feature you wanted added to reflex

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions