UNPKG

videx-3d

Version:

React 3D component library designed for sub surface visualizations in the browser

34 lines (33 loc) 1.01 kB
import { Remote } from 'comlink'; import { ReactNode } from 'react'; import { Store } from '../sdk/data/Store'; /** * DataProvider props * @expand */ export type DataProviderProps = { store: Store | Remote<Store>; children: ReactNode; }; /** * Provides sub components with the `DataContext`, which allow connecting to the * `Store` implementation. You can create your own provider if needed, but it will need to * provide an implementation of the `DataContext`. * * @example * <DataProvider store={store}> * { ... } * </DataProvider> * * @remarks * Components should use the `useData` hook to access the store. Generator functions * will have the store injected by the `GeneratorsProvider` provider component. * * @see {@link Store} * @see {@link DataContext} * @see {@link useData} * @see [Data](/videx-3d/docs/documents/data.html) * * @group Components */ export declare const DataProvider: ({ store, children }: DataProviderProps) => import("react/jsx-runtime").JSX.Element;