Stormkit provides a method to inject feature flags into your client-side application and control them through its user interface. Feature flag values are updated on the spot, allowing users to control features without needing deployment.
To create a feature flag:
To use the feature flags:
window.sk.features
globally available object.There are two methods to inject the window.sk.features
object into local environments. The first one is through fetching the feature flags from Stormkit API:
To access feature flags from other clients, use the Stormkit API by making a GET
request to https://api.stormkit.io/apps/<app-id>/envs/<env-id>/flags
. Replace <app-id>
and <env-id>
with your *App ID and Environment ID.
Example:
curl -X GET https://api.stormkit.io/apps/592128846360/envs/483571891194/flags
Output:
[
{ "flagName": "example_feature_flag", "flagValue":true }
]