Function: useLoadedWorkspace()
useLoadedWorkspace(
onLoad
,deps
):LoadedWorkspace
React hook to perform asynchronous initialization of the workspace.
This function could be used to setup data provider, fetch initial data or import existing diagram layout.
The command history is automatically reset when the initialization is done.
Example:
const {getContext, onMount} = useLoadedWorkspace();
return (
<Reactodia.Workspace ref={onMount}>
...
</Reactodia.Workspace>
);
Parameters
Parameter | Type |
---|---|
| ( |
|
|