You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-tggl-client

Package Overview
Dependencies
Maintainers
0
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-tggl-client

Tggl React SDK

3.1.0
latest
Source
npmnpm
Version published
Maintainers
0
Created
Source

Tggl Logo

Tggl React SDK

The React SDK can be used to evaluate flags and report usage to the Tggl API or a proxy.

🔗 Website📚 Documentation📦 NPM🎥 Videos

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')
 
  //...
}

Keywords

Tggl

FAQs

Package last updated on 16 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts