Getting started

Welcome! Let's get started. We'll do the following:

  1. Create your first feature flag

  2. Install the Bucket SDK

  3. Set feature access rules and/or remote configuration

  4. Monitor your feature launch

1. Create your first feature

Now let's create your first feature.

npx @bucketco/cli new

See CLI docs.

Next, let's set up a Bucket SDK for your language and framework.

2. Install the Bucket SDK

Find the supported languages below:

Code example for React

If you've installed the React SDK and have created a feature called my-new-feature, getting started will look like the following:

import { useFeature } from "@bucketco/react-sdk";

const MyFeature = () => {
  const { isEnabled } = useFeature("my-new-feature");

  return isEnabled ? "You have access!" : null;
};

You can now use isEnabled to gate access to the feature.

3. Set access rules

Head back over to your dashboard, select your feature and the Access tab.

From here, you can define segments, companies, and users that will access your feature.

4. Monitor your feature launch

On the Monitor tab you can track real-time feature exposure, adoption and user feedback.

Track exposure

The Exposed chart shows you companies that have been exposed to your feature. This means, companies that have been checked for feature access as per your targeting rules and the check return "enabled".

Track adoption

To track if exposed companies are also interacting with your feature, you can use track .

See the code example below.

Get user feedback

To get feedback from your users, you can add a static "Feedback" button or you can trigger a survey, at the right time.

Here's an example with a static feedback button.

import { useFeature } from "@bucketco/react-sdk";

const MyFeature = () => {
  const { isEnabled, requestFeedback } = useFeature("my-new-feature");

  if (!isEnabled) {
    return null;
  }

  return (
    <>
      <button onClick={() => track()}>Use feature</button>
      <button
        onClick={() => requestFeedback({ title: "How do you like this new feature?" })}
      >
        Give feedback
      </button>
    </>
  );
}

Get support

Last updated

Was this helpful?