Skip to main content
Module

x/fresh_store/mod.ts>StoreOptions

Simple store for Deno Fresh, to pass state between islands
Go to Latest
interface StoreOptions
import { type StoreOptions } from "https://deno.land/x/fresh_store@v1.0.1/mod.ts";

The options to create a store.

Properties

optional
pointer: Pointer

A key or "pointer" to the store location in window.stores.

optional
onChange: (state: T) => void

A "free" observer already configured. Will execute the callback when the state change.

optional
observers: Observer<T>[]

Additional observers that need to be attached to the store.

optional
override: boolean

If set to true, will override the store at the pointer's address if it exists.

Has no effect if the address is unallocated.