每当我点击上面的按钮时,我都会尝试为一个项目设置状态。我有一张地图,它运行在一个产品列表上,它返回一个带有按钮的卡片。我想点击按钮,然后设置变量,因为它需要为项目。例如:
const [isShown, setIsShown] = useState(false) // the state. obviously, it's going to show the result on every card inside that map.
let handleClick = (id: number) => {
getAmountOfTim