Skip to content

Feature Request: Persistent layout (navbar/sidebar/footer should not remount on navigation) #6175

@eribertocz

Description

@eribertocz

Problem

Reflex has no built-in API for persistent layout across pages.
Every page compiles to an independent React component inside ,
so navbar/sidebar/footer remounts on every navigation.

Expected

A simple Python API like:

app = rx.App(layout=my_layout)

or

@rx.layout
def my_layout(content):
return rx.vstack(navbar(), content)

Similar to:

  • SvelteKit: +layout.svelte (since v1.0)
  • Next.js: layout.tsx (since v13)
  • NiceGUI: automatic

Why this matters

This is the most basic feature any multi-page web app needs.
It should have been in v1 Without it, every page navigation
remounts the entire UI chrome unnecessarily.

Verified with Reflex 0.8.27 by inspecting generated JSX.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAnything you want improved

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions