useState. Type inference works very well for simple values: ... Don't forget to define the return type of reducer, otherwise TypeScript will infer it.
確定! 回上一頁