Install package
yarn installRun the development server:
yarn devOpen http://localhost:5173 with your browser to see the result.
This example demonstrates how to integrate Flagship feature flagging with React Router v7+. Key files include:
- root.tsx - Main layout with Flagship provider setup
- flagship.ts - SDK initialization helpers
- routes - Application routes
- components - Reusable components using Flagship flags
- Initializing Flagship SDK in a React Router application
- Pre-fetching flags with route loaders
- Using flag values in components
- Sending analytics hits
- Handling client-side navigation with flags
To learn more about Flagship and React Router, check out the following resources: