MCPcopy Create free account
hub / github.com/cosdensolutions/code / Counter

Function Counter

videos/long/redux-tutorial/src/components/Counter.tsx:10–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8} from "../state/counter/counterSlice";
9
10const Counter = () => {
11 const count = useSelector((state: RootState) => state.counter.value);
12 const dispatch = useDispatch<AppDispatch>();
13
14 return (
15 <div>
16 <h2>{count}</h2>
17 <div>
18 <button onClick={() => dispatch(incrementAsync(10))}>Increment</button>
19 <button onClick={() => dispatch(decrement())}>Decrement</button>
20 </div>
21 </div>
22 );
23};
24
25export default Counter;

Callers

nothing calls this directly

Calls 1

decrementFunction · 0.85

Tested by

no test coverage detected