<CopilotProvider/>

<CopilotProvider/>

The <CopilotProvider/> is a React Context Provider that manages configuration and state for all the copilot child components. It exposes an API to interact with the copilot configuration and state via React hooks.

Usage

_app.tsx
import { CopilotProvider } from "@continual/react";
 
const { CONTINUAL_COPILOT_ID } = process.env;
 
const App = () => (
  <CopilotProvider copilotId={CONTINUAL_COPILOT_ID}>
    <Copilot>
  </CopilotProvider>
);

Properties