react:Hook简介

1,hook 采用了js的闭包特性,可以在函数内 调用state。

2,useState 运用的是数组结构的方式定义变量。

 

posted @ 2020-12-07 17:38  毛栗的demo  阅读(71)  评论(0)    收藏  举报