Skip to content

[React Router](https://reactrouter.com/en/main) is a popular routing library for React applications. This guide explains how to integrate Flagship's feature flagging and experimentation capabilities with React Router applications.

Notifications You must be signed in to change notification settings

flagship-io/react-router-framework-mode-example

Repository files navigation

Example of Flagship implementation with React Router

Example documentation

Getting Started

Install package

yarn install

Run the development server:

yarn dev

Open http://localhost:5173 with your browser to see the result.

Project Structure

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

Features Demonstrated

  • 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

Learn More

To learn more about Flagship and React Router, check out the following resources:

About

[React Router](https://reactrouter.com/en/main) is a popular routing library for React applications. This guide explains how to integrate Flagship's feature flagging and experimentation capabilities with React Router applications.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published