import React from 'react'; // @ts-ignore import Highlight from 'react-highlight'; import { PageTitle } from 'UI'; function HowTo() { return (
{` // can be imported from @openreplay/tracker interface IFeatureFlag { key: string is_persist: boolean value: string | boolean payload: string } tracker.onFlagsLoad((flags: IFeatureFlag[]) => { /* run code */ }) // or if (openreplay.isFlagEnabled('my_flag')) { // run your activation code here } // or // returns FeatureFlag if exists tracker.getFeatureFlag('my_flag') // reload flags from server // (in case if any user data changed during the session) tracker.reloadFlags() `}
Documentation
); } export default HowTo;