In-App UI
React
Components
KnockProvider

KnockProvider

A React context provider that initializes and provides the Knock client instance to child components throughout your application.

Usage

#

Props

#
apiKeystringRequired

Your public API key from the Knock dashboard.

userobject

A user object containing information to identify the user on Knock.

identificationStrategystring

Defaults to inline. Can be set to skip to skip inline identification.

userTokenstring

The JWT token for authenticating the user (required when using enhanced security mode).

hoststring

The Knock API host URL. Defaults to the production Knock API.

logLevelstring

When set to debug, will output additional logging to aid with debugging.

childrenReactNode

Child components that will have access to the Knock client.