Back to React Router

Custom Active Link

examples/custom-link/README.md

7.6.2458 B
Original Source

Custom Link Example

This example demonstrates how to make a custom <Link> component to render something different when the link is "active" using the useMatch() and useResolvedPath() hooks.

Preview

Open this example on StackBlitz: