MCPcopy Create free account
hub / github.com/bholmesdev/simplestack-store / Counter

Function Counter

examples/vite-react/src/main.tsx:10–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8const countStore = store(0);
9
10function Counter() {
11 const count = useStoreValue(countStore);
12
13 return (
14 <div className="counter">
15 <span className="count">{count}</span>
16 <button onClick={() => countStore.set((c) => c + 1)}>+1</button>
17 </div>
18 );
19}
20
21function App() {
22 return (

Callers

nothing calls this directly

Calls 1

useStoreValueFunction · 0.90

Tested by

no test coverage detected