This repository was archived by the owner on Dec 7, 2022. It is now read-only.

Description
Any plans to support hooks so we can simplify our component tree or create easier composition of multiple feature flags? This feature has been around for more than a year, so it would be really great to support the modern standard.
Support would have to be bumped from React v16.3.0 to v16.8.0.
Suggested api
useFeatureFlag(flag: string): boolean | undefined
// undefined === 'loading'
Usage
import React from 'react';
import { useFeatureFlag } from 'react-launch-darkly';
const Comp = () => {
const isAnniversaryCallTask = useFeatureFlag('anniversary-call-task');
return (
<div>
{isAnniversaryCallTask ? 'Flag on' : 'Flag off'}
</div>
);
};