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
<script lang="ts">
import { Calendar } from "@wx/svelte-calendar";
import type { CalendarInstanceApi } from "@wx/svelte-calendar";
let api = $state<CalendarInstanceApi>();
function logStore() {
const { data } = api.getStores();
console.log(data);
}
</script>
<Calendar {events} bind:this={api} />
<button onclick={logStore}>Inspect store</button>
Related articles
getState— non-reactive snapshot for most use cases.getReactiveState— Svelte stores per state field.exec— preferred entry point for changing store state.