getStores
Returns the underlying store instances. Used by advanced integrations that need direct access to the store rather than the curated state snapshot.
Usage
getStores(): { data: CalendarStore };
Returns:
| Field | Type | Description |
|---|---|---|
data | CalendarStore | Internal store holding events and view state. |
Example
import { useRef } from "react";
import { Calendar } from "@wx/react-calendar";
import type { CalendarInstanceApi } from "@wx/react-calendar";
export default function App() {
const apiRef = useRef<CalendarInstanceApi>(null);
const logStore = () => {
const { data } = apiRef.current.getStores();
console.log(data);
};
return (
<>
<Calendar events={events} ref={apiRef} />
<button onClick={logStore}>Inspect store</button>
</>
);
}
Related articles
getState— non-reactive snapshot for most use cases.getReactiveState— reactive state per state field.exec— preferred entry point for changing store state.