Sample Projects
The best way to see RocketFlag in action is to run a real app. These open-source samples show end-to-end integration you can clone, run, and adapt.
React Demo
Section titled “React Demo”A minimal React + Vite + TypeScript app that initialises a RocketFlag client and conditionally renders UI based on a flag’s state.
- Repository: github.com/RocketFlag/react-rocketflag
git clone https://github.com/rocketflag/react-rocketflag.gitcd react-rocketflagnpm installnpm run devOpen http://localhost:5173, set your own Flag ID in src/App.tsx, and toggle the flag in the console to watch the UI change.
Tip: This sample fetches flags with the core client and a manual
useEffect. For new React apps we recommend the React SDK, which gives you a provider, theuseFlaghook, and a declarative<Flag>component with built-in loading/error handling.
Build Your Own
Section titled “Build Your Own”Whatever your stack, getting started is the same three steps:
- Create a flag in the console — see the Quick Start.
- Install the relevant SDK (Node, React, Go) or call the API directly.
- Read the flag’s
enabledvalue and branch your code on it.
Using a language we don’t have an SDK for yet? The API is a single GET request — see the Quick Start for curl, JavaScript, Python, Ruby, and Go examples.