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

Function App

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected