Installation
This SDK integrates a fully serviced chat experience on the BotStacks platform.
Install the UIKit
Add to your project
To use the SDK and, therefore, the data storage and API layer, you need to wrap your chat related code
with BotStacksChatProvider
. It’s simplest to put this near the root of your component tree.
In its simplest form, it should look like this:
Make sure you only have one BotStacksChatProvider
. Having multiple may yield
unexpected results.
Accessing data
The React UI Kit extends the JavaScript SDK to create and set up the store for you as part of the BotStacksChatProvider
.
To enable your custom components to be reactive and data aware, you only need to wrap your components with observer
, thus granting you access to the store.
Quickstart
If you want to use our feature complete UI, including routing or just simply want to give it a test
run, you can use the BotStacksChatUI
component.
Here is a full example, using a hardcoded user to log in.
Was this page helpful?