feature-flags-co / ffc-js-client-side-sdk-react-redux-demo

React redux demo for ffc-js-client-side-sdk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Get started

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

  2. Create two flags in your environment

    1. hello with two options: Wrold 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

About

React redux demo for ffc-js-client-side-sdk

License:Apache License 2.0


Languages

Language:TypeScript 75.6%Language:CSS 13.8%Language:HTML 10.6%