Skip to content
public-library›Rules›TanStack Router›Mask modal routes with the resource's canonical URL

Mask modal routes with the resource's canonical URL

When a resource opens in a modal over another page, give the modal its own route and navigate to it with a mask whose URL is the resource's full page, such as navigating to /photos/5/modal masked as /photos/5.

In the full rule