getStores
Returns the raw store instances. This is an escape hatch - anything you can achieve through getState, exec, or on should go through those instead.
Usage
getStores(): { data: KanbanStore };
| Field | Type | Description |
|---|---|---|
data | KanbanStore | The internal kanban store driving the board |
Example
import { useRef } from "react";
import { Kanban } from "@svar-ui/react-kanban";
function App() {
const apiRef = useRef(null);
function inspectStore() {
const { data } = apiRef.current.getStores();
console.log(data);
}
return (
<>
<Kanban cards={cards} columns={columns} ref={apiRef} />
<button onClick={inspectStore}>Inspect store</button>
</>
);
}
Related
- getState - non-reactive state snapshot (preferred)
- getReactiveState - reactive stores (preferred)