Install
Set up the provider
Wrap your app inSoftlaunchProvider with a client key (slc_). The provider loads your configuration and keeps it up to date.
Read a flag
Each flag type has a hook. Pass the flag key, a subject key, attributes, and a default value.useBooleanFlag(flagKey, subjectKey, attributes, defaultValue)useStringFlag(flagKey, subjectKey, attributes, defaultValue)useIntegerFlag(flagKey, subjectKey, attributes, defaultValue)useNumericFlag(flagKey, subjectKey, attributes, defaultValue)useJsonFlag<T>(flagKey, subjectKey, attributes, defaultValue)
The result object
Every hook returns the same shape:Hooks re-render when your configuration updates, so you don’t need to poll or refresh. Just read
value.