Skip to content

Latest commit

 

History

History
45 lines (38 loc) · 1.24 KB

File metadata and controls

45 lines (38 loc) · 1.24 KB

The ffc-js-client-side-sdk demo for react with jotai

Get started

  1. Go to https://portal.featureflag.co create your project

  2. Create two flags in your environment

    1. hello with two options: World and Universe hello flag config
    2. counter with two options: true and false counter flag config
  3. Open src/app/ffcConfig.ts and fill the option constant with the right value

export const option: IOption = {
    secret: "USE_YOUR_ENVIRONMENT_SECRET", // replace with your won secret
    anonymous: false,
    user: { // you can keep this
        id: 'my-user',
        userName: 'my user',
        email: '',
        customizedProperties: [
            {
                "name": "sex",
                "value": "male"
            }]
    },
    devModePassword: 'thisisademo'
}
  1. Run
npm install
npm run start
  1. Results:
    1. Hello World Hello World
    2. Hello Universe Hello Universe
    3. Activate counter module Activate counter module