useState<string[]>(['a']); const onClick = () => { setArray((array) => [...array, 'b']); // copies into a new array };.
確定! 回上一頁