{"repo":"yesmeck/safe-routes","free":true,"listed":false,"github":"https://github.com/yesmeck/safe-routes","clone":"git clone https://github.com/yesmeck/safe-routes.git","description":"Typesafe routing for React Router v7 apps.","language":"TypeScript","stars":512,"topics":["remix","typescript","react-router"],"license":"MIT","category":"saas-starters-boilerplates","readme_excerpt":"safe-routes Type-safe helper for manipulating internal links in your React Router apps. [!note] remix-routes has been renamed to safe-routes. If you are looking for the documentation of remix-routes, please refer to here. Please refer to the upgrading guide if you are upgrading from remix-routes. Highlights - Typed URL generation - Appending query string - Typed query string - Typed route ids - Basename support Installation Setup Add safeRoutes plugin to your vite.config.ts : Supported config options: - strict: boolean - outDir: string Add safe-routes typegen to the typecheck script: Usage Typed URL generation Appending query string Typed query string Define type of query string by exporting a type named SearchParams in route file: You can combine this feature with zod and remix-params-helper to add runtime params checking: Checking params [!NOTE] This function has been marked @deprecated in favor of React Router's built-in type-safety, which provides strongly typed params to loaders, actions, and components. This helper has been kept primarily to assist in incremental migration. Typed route ids safe-routes exports the RouteId type definition with the list of all valid route ids for your repository, and has a helper function $routeId that tells typescript to restrict the given string to one of the valid RouteId values. Basename support Basename is supported out of the box. If you have set a basename in your vite.config.ts and react-router.config.ts , safe-routes will automati","default_branch":null,"files":null,"tree":[],"storefront":"/r/yesmeck","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/yesmeck/safe-routes/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}