React Router

MemoryRouter

Declarative router with an in-memory history; useful for isolated examples.

Formal Syntax & Structure

react syntaxreact
<MemoryRouter initialEntries={["/trails"]}>…</MemoryRouter>

Working Example

Example Snippetreact
<MemoryRouter><AppRoutes /></MemoryRouter>
React Reference