import ReactFlow from 'react-flow-renderer/nocss'
export const Flow = () => (
<ReactFlow
elements={elements}
onElementClick={onElementClick}
onConnect={onConnect}
/>
)
import { ReactFlowProvider, useStoreState, useStoreActions } from 'react-flow-renderer/nocss';
import Sidebar from './Sidebar';
export const Wrapper = () => {
const elements = useStoreState((state) => state.elements)
const setElements = useStoreActions((actions) => actions.setElements);
return (
<ReactFlowProvider>
<Flow/>
<Sidebar elements={elements} setElements={setElements}/>
</ReactFlowProvider>
}