RolloutConnectProvider

Description#

Rollout Connect components require certain context to be provided via RolloutConnectProvider. You can put this at the root of your React tree, or just wrap any component that requires it.

Import#

import { RolloutConnectProvider } from "@rollouthq/connect-react";

Usage#

Here's a basic usage example:

function App() {
// token can be string, or a function to get it
<RolloutConnectProvider token={token}>
<MyAutomations
onCreateAutomation={() => navigate("create")}
onEditAutomation={(automation) => navigate(`${automation.id}/edit`)}
/>
</RolloutConnectProvider>
}