摘要: 一、基础 Hook 1. useState 函数式组件获得状态state的方式。 useState 返回一个数组,useState( "参数" ) ,参数即为初始化的值。 可以为 数组、对象、字符串、数字 import React, { useState } from 'react' const [ 阅读全文
posted @ 2021-11-12 20:31 青柠i 阅读(140) 评论(0) 推荐(0) 编辑