Skip to main content

Class: EvolvClient

@evolv/react.EvolvClient

Constructors

constructor

new EvolvClient(options)

Parameters

NameType
optionsPartial<EvolvClientOptions>

Properties

context

context: EvolvContext


environment

environment: string

Methods

allowEvents

allowEvents(): void

Returns

void


clearActiveKeys

clearActiveKeys(prefix?): void

Deprecated

Parameters

NameType
prefix?string

Returns

void


confirm

confirm(): void

Returns

void


contaminate

contaminate(details?, allExperiments?): void

Parameters

NameType
details?Record<string, any>
allExperiments?boolean

Returns

void


destroy

destroy(): void

Returns

void


emit

emit(type, metadata?, flush?): void

Parameters

NameType
typestring
metadata?Record<string, any>
flush?boolean

Returns

void


flush

flush(): void

Returns

void


get

get<T>(key): SubscribablePromise<T | Error>

Type parameters

NameType
Tany

Parameters

NameType
keystring

Returns

SubscribablePromise<T | Error>


getActiveKeys

getActiveKeys(prefix?): SubscribablePromise<{ current: string[] ; previous: string[] }>

Parameters

NameType
prefix?string

Returns

SubscribablePromise<{ current: string[] ; previous: string[] }>


getConfig

getConfig(key): SubscribablePromise<any>

Parameters

NameType
keystring

Returns

SubscribablePromise<any>


getDisplayName

getDisplayName(): SubscribablePromise<string>

Returns

SubscribablePromise<string>


getEnvConfig

getEnvConfig(key): SubscribablePromise<any>

Parameters

NameType
keystring

Returns

SubscribablePromise<any>


initialize

initialize(uid, remoteContext?, localContext?): void

Parameters

NameType
uidstring
remoteContext?Record<string, any>
localContext?Record<string, any>

Returns

void


isActive

isActive(key): SubscribablePromise<boolean>

Parameters

NameType
keystring

Returns

SubscribablePromise<boolean>


off

off(topic, listener): void

Parameters

NameType
topicEventName
listenerListener

Returns

void


on

on(topic, listener): void

Parameters

NameType
topicEventName
listenerListener

Returns

void


once

once(topic, listener): void

Parameters

NameType
topicEventName
listenerListener

Returns

void


preload

preload(prefixed, configOnly?, immediate?): void

Parameters

NameType
prefixedstring[]
configOnly?boolean
immediate?boolean

Returns

void


reevaluateContext

reevaluateContext(): void

Returns

void