🛠️Using Launchbees React SDK

Ensure your app takes flight without any stings attached 🐝

Installation & Setup

Installation is a one-time process and should only take 15 minutes.

Summary

Pre-requisites:

  • React App

  • Launchbees Account

  • Environment Key (Can be obtained here: link )

  • Access to launchbees sdk repo (please mail [email protected] if not already provided)

Steps

  • Install React SDK

  • Configure App to use Launchbees

  • Identify LoggedIn user’s traits (Organization)

Guide

Install React SDK

Configure App to use Launchbees

Wrap in Launchbees Provider

Identify LoggedIn user’s traits (Organization)

To be done when login state changes like login and page reload.

Using Flags (in less than 2 mins)

Using feature flags is done during the development of any new feature or can be added at the old feature which you want to control using flags.

Pre-requisites:

Use Cases

  • Hiding / Showing based on flag

  • Disabling Buttons

  • Switching component based on flag

You would need to use hook useFlags that can be imported from sdk.

Accessing isEnabled for a feature

To access whether a feature flag is enabled or disabled, you can use the useFlags hook and pass in an array with the feature key.

Using Flag to hide/show

To hide or show content based on a feature flag, you can use the isEnabled property from the useFlags hook.

Disabling Buttons

To disable a button based on a feature flag, you can use the isEnabled property from the useFlags hook.

Using Flag to switch component

To switch a component based on a feature flag, you can use the isEnabled property from the useFlags hook to conditionally render a component.

Last updated