MCPcopy Create free account
hub / github.com/GreatStackDev/gocart / addToCartHandler

Function addToCartHandler

components/Counter.jsx:11–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9 const dispatch = useDispatch();
10
11 const addToCartHandler = () => {
12 dispatch(addToCart({ productId }))
13 }
14
15 const removeFromCartHandler = () => {
16 dispatch(removeFromCart({ productId }))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected