import React from 'react'; import { PageTitle, CodeBlock } from 'UI'; function HowTo() { const code = ` // 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() ` return (
Documentation
); } export default HowTo;