The first time the button is exhibited, depend are going to be 0 simply because you handed 0 to useState(). when you need to change condition, connect with setCount() and pass the new price to it. Clicking this button https://albievjhy712087.blogdigy.com/top-react-js-introduction-pdf-secrets-44496492