react
import {
useStore
} from "exome/react";
function useStore
Subscribes to store instance update events and trigger updates to component accordingly.
function useStore<T extends Exome>(store: T): Readonly<T>;
example.tsx
import { useStore } from "exome/react"
import { counterStore } from "./counter.store.ts"
function App() {
const { count, increment } = useStore(counterStore)
return (
<button onClick={increment}>{count}</button>
);
}