T8 React Router

Custom routing behavior

Custom routing behavior example

In this example, we've got a kind of a browser-in-browser with its routing based on a text input rather than the URL. It's enabled by passing an instance of a custom extension of the Route class, InputRoute, to the <Router> component, configured to interact with a text input.

This example also shows how the same routing code (of the <Content> component) can interact with either the URL or the text input element based on the closest <Router> component up the component tree.