State: a value that changes
Your task In the code box, in AddToCart, add const [count, setCount] = useState(0);, show In your cart: {count}, and make the button add one on every press. Then press Run my code.
Getting the editor ready
Your task In the code box, in AddToCart, add const [count, setCount] = useState(0);, show In your cart: {count}, and make the button add one on every press. Then press Run my code.
Getting the editor ready