Installation
1. Install the package
- npm
- Yarn
- pnpm
- Bun
npm install @fishjam-cloud/react-client
yarn add @fishjam-cloud/react-client
pnpm add @fishjam-cloud/react-client
bun add @fishjam-cloud/react-client
2. Setup Fishjam context
Wrap your app in our FishjamProvider
component.
import
React from "react"; importReactDOM from "react-dom/client"; // import App from "./App"; import {FishjamProvider } from "@fishjam-cloud/react-client";ReactDOM .createRoot (document .getElementById ("root")!).render ( <React .StrictMode > <FishjamProvider > <App /> </FishjamProvider > </React .StrictMode >, );
tip
It's possible to have many independent Fishjam contexts in one app.
Just render many FishjamProvider
components and make sure they don't overlap.