摘要:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>props的函数组件实现</title> <script src="https://unpkg.com/react@18/umd/react.development.js"></s 阅读全文
posted @ 2023-07-30 19:41
谁知道水烫不烫
阅读(27)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>props的基本使用</title> <script src="https://unpkg.com/react@18/umd/react.development.js"></scr 阅读全文
posted @ 2023-07-30 18:50
谁知道水烫不烫
阅读(14)
评论(0)
推荐(0)
摘要:
1.类外写法 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>props类型限制</title> <script src="https://unpkg.com/react@18/umd/react.development.js" 阅读全文
posted @ 2023-07-30 18:50
谁知道水烫不烫
阅读(97)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>state的简写形式</title> <script src="https://unpkg.com/react@18/umd/react.development.js"></scr 阅读全文
posted @ 2023-07-30 15:25
谁知道水烫不烫
阅读(28)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>setState</title> <script src="https://unpkg.com/react@18/umd/react.development.js"></scrip 阅读全文
posted @ 2023-07-30 15:17
谁知道水烫不烫
阅读(19)
评论(0)
推荐(0)
摘要:
一、state是什么 从字面上来书state就是状态,在React中,state驱动页面的展示,它负责存放数据。 二、state的使用 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>初始化state</title> <scri 阅读全文
posted @ 2023-07-30 14:12
谁知道水烫不烫
阅读(96)
评论(0)
推荐(0)
摘要:
1.函数式组件 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>函数式组件</title> <script src="https://unpkg.com/react@18/umd/react.development.js"></ 阅读全文
posted @ 2023-07-30 13:49
谁知道水烫不烫
阅读(23)
评论(0)
推荐(0)
摘要:
1.jsx语法 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>jsx语法</title> <script src="https://unpkg.com/react@18/umd/react.development.js"></ 阅读全文
posted @ 2023-07-30 13:48
谁知道水烫不烫
阅读(17)
评论(0)
推荐(0)
摘要:
1.使用js创建虚拟DOM(不推荐使用) <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>js创建虚拟DOM</title> <script src="https://unpkg.com/react@18/umd/react.d 阅读全文
posted @ 2023-07-30 13:46
谁知道水烫不烫
阅读(67)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>helloReact</title> <script src="https://unpkg.com/react@18/umd/react.development.js"></scr 阅读全文
posted @ 2023-07-30 13:44
谁知道水烫不烫
阅读(13)
评论(0)
推荐(0)

浙公网安备 33010602011771号