repos / starfx

a micro-mvc framework for react apps
git clone https://github.com/neurosnap/starfx.git

starfx / store
Eric Bower  ·  2024-03-04

context.ts

1import { Channel, createChannel, createContext } from "../deps.ts";
2import type { AnyState } from "../types.ts";
3import type { FxStore } from "./types.ts";
4
5export const StoreUpdateContext = createContext<Channel<void, void>>(
6  "starfx:store:update",
7  createChannel<void, void>(),
8);
9export const StoreContext = createContext<FxStore<AnyState>>("starfx:store");