new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

React Router · Getting started · all subjects

custom framework/hydration

2 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Browser hydration with __staticRouterHydrationData

Hydration data is embedded onto window.__staticRouterHydrationData on the server. Use this data to initialize the client-side router by passing it as the hydrationData option when creating a browser router with createBrowserRouter.

Browser hydration example

Example of hydrating a client-side router with server data: ```tsx import { StrictMode } from "react"; import { hydrateRoot } from "react-dom/client"; import { RouterProvider } from "react-router/dom"; import routes from "./app/routes.js"; import { createBrowserRouter } from "react-router"; let router = createBrowserRouter(routes, { hydrationData: window.__staticRouterHydrationData, }); hydrateRoot( document, <StrictMode> <RouterProvider router={router} /> </StrictMode>, ); ```

Give your agent this brain