Skip to content

Commit 4f209fd

Browse files
authored
Add Toolbar section (#482)
Added documentation for the Reflag Toolbar, including usage and configuration options.
1 parent c2cc7f5 commit 4f209fd

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

packages/react-sdk/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,25 @@ const {
195195
Note that, similar to `isEnabled`, accessing `config` on the object returned by `useFlag()` automatically
196196
generates a `check` event.
197197

198+
## Toolbar
199+
200+
The Reflag Toolbar is great for toggling flags on/off for yourself to ensure that everything works both when a flag is on and when it's off.
201+
202+
<img width="310" height="265" alt="Toolbar" src="https://github.com/user-attachments/assets/61492915-0d30-446d-a163-3eb16d9024b2" />
203+
204+
The toolbar will automatically appear on `localhost`. However, it can also be incredibly useful in production. You have full control over when it appears through the `toolbar` configuration option passed to the ReflagProvider.
205+
206+
You can pass a simple boolean to force the toolbar to appear/disappear:
207+
208+
```ts
209+
<ReflagProvider
210+
...
211+
// show the toolbar even in production if the user is an internal/admin user
212+
toolbar={user?.isInternal}
213+
...
214+
});
215+
```
216+
198217
## Server-side rendering and bootstrapping
199218

200219
For server-side rendered applications, you can eliminate the initial network request by bootstrapping the client with pre-fetched flag data using the `ReflagBootstrappedProvider`.

0 commit comments

Comments
 (0)