This is a companion application for the blog post titled Using Feature Flags in a React.js Application.
This app demonstrates the use of ConfigCat's Feature Flags in a React application, showcasing how a feature flag can be used to toggle three cars racing towards a finish line.
- Clone this repository:
git clone git@github.com:configcat-labs/feature-flags-in-react-sample.git
- Install the dependencies:
npm install
- Run the app in development mode:
npm run dev
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits. You will also see any lint errors in the console.
- To build the app for production, execute:
npm run build
This command correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes. Your app is ready to be deployed!
See the section about deployment for more information.
You can learn more in the Start a New React Project.
To learn React, check out the React documentation.
ConfigCat also supports many other frameworks and languages. Check out the full list of supported SDKs here
You can also explore other code samples for various languages, frameworks, and topics here in the ConfigCat labs on GitHub.
Keep up with ConfigCat on X, Facebook, LinkedIn, and GitHub.
Contributions are welcome!