3.1.0 • Published 4 months ago

react-tggl-client v3.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
4 months ago

Usage

Install the dependency:

npm i react-tggl-client

Add the provider to your app:

import { TgglClient, TgglProvider } from 'react-tggl-client'

// Instanciate it outside of your component
const client = new TgglClient('YOUR_API_KEY')

const App = () => {
  return (
    <TgglProvider client={client}>
      {/*...*/}
    </TgglProvider>
  )
}

Use the hook to evaluate flags:

import { useFlag } from 'react-tggl-client'
 
const MyComponent = () => {
  const { value } = useFlag('myFlag', 'Varation A')
 
  //...
}
3.1.0

4 months ago

3.0.0

6 months ago

2.3.0

7 months ago

2.2.1

8 months ago

2.2.0

8 months ago

2.1.1

10 months ago

2.1.0

11 months ago

2.0.0

1 year ago

1.6.1

1 year ago

1.5.2

1 year ago

1.6.0

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.4.0

2 years ago

1.3.0

2 years ago

1.1.1

3 years ago