Reference
Interfaces
Features
Type Aliases
BucketProps
Type declaration
apiBaseUrl
?
string
‐
children
?
ReactNode
‐
debug
?
boolean
‐
enableTracking
?
boolean
‐
featureOptions
?
‐
feedback
?
‐
host
?
string
Deprecated
Use apiBaseUrl
instead.
loadingComponent
?
ReactNode
‐
newBucketClient
?
‐
publishableKey
string
‐
sseBaseUrl
?
string
‐
sseHost
?
string
Deprecated
Use sseBaseUrl
instead.
FeatureKey
Functions
BucketProvider()
Parameters
__namedParameters
Returns
Element
useFeature()
Returns the state of a given feature for the current context, e.g.
Parameters
key
string
Returns
| { isEnabled
: boolean
; isLoading
: true
; requestFeedback
: (opts
: Omit
<RequestFeedbackData
, "featureId"
| "featureKey"
>) => undefined
| void
; track
: () => undefined
| Promise
<undefined
| Response
>; } | { isLoading
: false
; requestFeedback
: (opts
: Omit
<RequestFeedbackData
, "featureId"
| "featureKey"
>) => undefined
| void
; track
: () => undefined
| Promise
<undefined
| Response
>; get isEnabled
: boolean
; }
useRequestFeedback()
Returns a function to open up the feedback form Note: When calling useRequestFeedback
, user/company must already be set.
See link for more information
Returns
Function
Parameters
options
Returns
undefined
| void
useSendFeedback()
Returns a function to manually send feedback collected from a user. Note: When calling useSendFeedback
, user/company must already be set.
See link for more information
Returns
Function
Parameters
opts
Returns
undefined
| Promise
<undefined
| Response
>
useTrack()
Returns a function to send an event when a user performs an action Note: When calling useTrack
, user/company must already be set.
Returns
Function
Parameters
eventName
string
attributes
?
null
| Record
<string
, any
>
Returns
undefined
| Promise
<undefined
| Response
>
useUpdateCompany()
Returns a function to update the current company's information. For example, if the company changed plan or opted into a beta-feature.
The method returned is a function which returns a promise that resolves when after the features have been updated as a result of the company update.
Returns a function to update the "other" context information. For example, if the user changed workspace, you can set the workspace id here.
The method returned is a function which returns a promise that resolves when after the features have been updated as a result of the update to the "other" context.
Returns a function to update the current user's information. For example, if the user changed role or opted into a beta-feature.
The method returned is a function which returns a promise that resolves when after the features have been updated as a result of the user update.
Returns
Function
Parameters
opts
{}
Returns
undefined
| Promise
<void
>
Last updated