DocsChoose
CSR (client-side rendering)
Client-side rendering turns navigation over to the browser after the first load. Enable it in
nexyconfig.py.
from nexy.core.models import NexyConfigModel
class NexyConfig(NexyConfigModel):
useFF = "react"
useCSR = TrueRules
useCSRrequiresuseFF. Validation rejectsuseCSR = Truewithout a client framework..nexypages are disabled in CSR mode and skipped with a warning. Use framework routes or.md/.mdx.useRouteris incompatible withuseCSR.- Only navigable framework route files are handled by the client router:
.tsx,.jsx,.vue,.svelte. .mdroutes can be served with a CSR shell.
Layout
There is no layout.nexy in client mode. The root layout (layout.tsx, layout.vue or layout.svelte) owns the HTML document
(<html>, <head>, <body>) and Nexy renders it in Node: see
Layouts. Nested layouts keep their state while navigating.
The rules of the two modes are in Server mode and client mode.
Behaviour
The first load returns HTML. After that, the client router handles navigation between navigable routes in the browser. Framework routes are mounted client-side.