在 hooks 中使用 function 定義還是 const 定義合適呢?
一、 function?handle()?{ ????console.log(1) } export?default?handle 二、 const?handle?=?()?=>?{ ????console.log(1) } export?default?handle
一、 function?handle()?{ ????console.log(1) } export?default?handle 二、 const?handle?=?()?=>?{ ????console.log(1) } export?default?handle
2021-10-17
舉報(bào)
2021-12-15
我建議用const,