How do I pass parameters in a function with useState?

前端 未结 0 1933
攒了一身酷
攒了一身酷 2021-01-26 22:17

How do I pass parameters in a function with useState?

const [count, setCount] = useState(0);
const addNumber = (number) => setCount(count + number)

//////////         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题