Providers
WeaveProvider
API reference for WeaveProvider component
Overview
The WeaveProvider is a core component from the React Helper library that initializes and provides Weave.js context to your React application. It sets up the needed elements for real-time collaboration and canvas rendering:
- Store
- Nodes
- Plugins
- Actions
- Fonts
By wrapping your app (or part of it) with WeaveProvider, you can make use of the useWeave hook to access the API of the Weave instance.
Nodes, Actions and Plugins by default?
By default this helper doesn't include any nodes, actions or plugins. You must add your own.
Import
import { WeaveProvider } from "@inditextech/weave-react";
Props
Prop | Type | Default |
---|---|---|
fonts? | WeaveFont[] | [] |
customActions? | WeaveAction[] | [] |
customPlugins? | WeavePlugin[] | [] |
customNodes? | WeaveNode[] | [] |
actions? | WeaveAction[] | [] |
plugins? | WeavePlugin[] | [] |
nodes? | WeaveNode[] | [] |
children | ReactNode | - |
store | WeaveStore | - |
getContainer | () => HTMLDivElement | - |