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 · API · all subjects

outlet

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

Outlet component summary

Outlet renders the matching child route of a parent route, or nothing if no child route matches. It is a React component used to display nested routes in a parent component.

Outlet function signature

Outlet is defined as: function Outlet(props: OutletProps): React.ReactElement | null. It accepts an OutletProps object and returns either a React element or null.

Outlet context prop

The context prop accepts a context value that will be provided to the element tree below the outlet. This allows a parent route to pass values to child routes. Access the context in child routes using the useOutletContext hook.

Outlet basic example

Example showing how to use Outlet in a parent component: import { Outlet } from "react-router"; export default function SomeParent() { return ( <div> <h1>Parent Content</h1> <Outlet /> </div> ); } This renders parent content and the matching child route below it.

useOutlet used internally by Outlet component

The useOutlet hook is used internally by the <Outlet> component to render child routes.

Outlet component renders nested route content

The Outlet component from 'react-router' is used in the root component to render the content of nested routes.

Give your agent this brain