Reference

CanduProvider

<CanduProvider
clientToken="YOUR_CLIENT_TOKEN"
userId="YOUR_USER_ID"
traits={YOUR_USER_TRAITS}
styleguide={YOUR_STYLEGUIDE_OBJECT}
globalVariables={YOUR_GLOBAL_VARIABLES}
/>

Creates a new instance of the client that bootstraps the application. After creating the new object, you will be able use the client to access different methods.

Arguments

Argument Names

Type

Required

Description

clientToken

String

Yes

The clientToken associated with your Candu application.

userId

String

Yes

The userId that you want to track.

traits

Object

No

User traits that you want track about that user. Traits areused to match a Tutorial to a Segment in a Portal and for other dynamic behaviors.

styleguide

Object

No

Styleguide is a set of React components used to customize the rendering of the application so that it looks native. Check the React styleguide documentation for more informations.

globalVariables

Object

No

A set of variables to be shared with any portals in Candu. They can be used to render content or conditionally show

You will not be able to create a Portal unless you inject the CanduPortal.

Portal

A portal is used to inject content into your application. Portals will use the styleguide you provide in order to render the Tutorials you created in the Candu dashboard.

<Portal
id="YOUR_PORTAL_ID"
variables={YOUR_LOCAL_VARIABLES}
/>

Arguments

  1. id (String): the unique identifier of your portal

  2. [variables] (Object): Any variable that you want to inject into this portal. These variables will override the globalVariables you specified in the CanduProvider.