React Router Now Supports Contextual Routing with <Link unstable_mask>
React Router just released v7.13.1. Along with a few bug fixes and improvements, it also introduced an exciting new feature: URL masking through the new <Link unstable_mask={...}> API for Fra...

Source: DEV Community
React Router just released v7.13.1. Along with a few bug fixes and improvements, it also introduced an exciting new feature: URL masking through the new <Link unstable_mask={...}> API for Framework and Data Mode. This API now provides a first-class way to handle contextual routing. But what exactly is contextual routing? Already familiar with contextual routing? Feel free to skip ahead to the API section. If not, let’s quickly break it down first. Contextual Routing What Is Contextual Routing? Contextual Routing means that the same URL might lead to different routes depending on how it was reached. At first, that might sound like inconsistent behavior, but it really isn't once the context is clear. For example, imagine you are browsing a product catalog and click on a product. Instead of opening as a separate page, the product details show up in a modal (overlay on top of the catalog). That is great for UX because you can quickly check the product without moving away from the cat