Toggle toolbar with a flag
Learn how you can control who gets the toolbar in production by toggling a feature flag on/off
$ npx reflag new toolbarfunction ToolbarFlagControl() {
const client = useClient();
const {isEnabled: toolbarEnabled} = useFlag("toolbar");
useEffect(() => {
if (toolbarEnabled) {
client?.showToolbarToggle();
}
}, [toolbarEnabled]);
}Last updated
Was this helpful?