MCPcopy Create free account
hub / github.com/TanStack/devtools / App

Function App

examples/preact/custom-devtools/src/App.tsx:7–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5
6export default function App() {
7 const [count, setCount] = useState(counterInstance.getCount())
8
9 const increment = () => {
10 counterInstance.increment()
11 setCount(counterInstance.getCount())
12 }
13
14 const decrement = () => {
15 counterInstance.decrement()
16 setCount(counterInstance.getCount())
17 }
18
19 return (
20 <div>
21 <h1>Custom plugins</h1>
22 <h2>Count: {count}</h2>
23 <div style={{ display: 'flex', gap: '4px' }}>
24 <button onClick={increment}>+ increase</button>
25 <button onClick={decrement}>− decrease</button>
26 </div>
27 </div>
28 )
29}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected