Intent Client
React
Install the client for use in a React app
Installation
You can install the Unify Intent React library with your preferred package manager:
npm
yarn
Usage
First, wrap your React app in a UnifyIntentProvider
:
index.tsx
The UnifyIntentProvider
automatically takes care of mounting and unmounting the client
for you whenever the component mounts and unmounts. So any components rendered in your app
can freely access and use the intent client using the useUnifyIntent
hook:
Example.tsx
You can then use the resulting client instance to log intent data. See the Client Spec for more details on how to use the client.