This Storybook addon integrates Remix React Router into your stories, enabling comprehensive testing and demonstration of components that rely on React Router's navigation and state management. The current stable version is 6.1.0, released recently in March 2026, indicating an active development and maintenance cadence with frequent updates to support new Storybook and React Router versions. A key differentiator is its explicit support for `react-router@7` and newer, making a clear distinction from earlier versions (v3 and below) that supported `react-router-dom`. It provides a `withRouter` decorator and `reactRouterParameters` to configure routes, locations, path parameters, search parameters, and state directly within your stories, allowing for precise control over the routing context for each component variant. This addon ensures that components designed for a Remix React Router environment can be faithfully rendered and interacted with in isolation within Storybook.
npm install storybook-addon-remix-react-routerVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to configure and use the `withRouter` decorator and `reactRouterParameters` to set up routing context for a `UserProfile` component in Storybook, including path parameters and search parameters for different story states.
If your project still uses `react-router-dom`, you must downgrade to `storybook-addon-remix-react-router@^3.0.0`. For newer projects using `react-router`, ensure all imports and usage conform to `react-router` conventions.
Always consult the compatibility table in the README and install the addon version that matches your Storybook major version (e.g., `npm i -D storybook-addon-remix-react-router@^6.0.0` for Storybook 10).
Ensure you are using `storybook-addon-remix-react-router@^4.0.1` or newer to avoid this specific export path issue. Always keep packages updated to their latest patch versions.
When using `location.path` as a function that returns a string, explicitly use `generatePath` from `react-router` to construct dynamic paths if variables are involved, otherwise, the path may not resolve correctly.
Upgrade your project to use `react-router` directly (and remove `react-router-dom`) or downgrade the addon to version `^3.0.0` if `react-router-dom` usage is required.
Ensure that `decorators: [withRouter]` is applied to your component's meta or story, and `parameters.reactRouter` is correctly defined using `reactRouterParameters({...})`.Verify the import statement is `import { reactRouterParameters } from 'storybook-addon-remix-react-router';` (named import with correct casing).Check the addon's README for its compatibility table and install the version that specifically supports your Storybook major version (e.g., `storybook-addon-remix-react-router@^6.0.0` for Storybook 10).