Lazy loaded image
学习笔记
🗒️【react全家桶】week02
字数 1014阅读时长 3 分钟
2025-7-8
2025-7-14
type
status
date
slug
summary
tags
category
icon
password
笔记来源:
react中文网:

一、React开发环境的创建

1、创建项目

在dos命令窗口输入:
notion image

2、运行项目

(1)方法一:

notion image

(2)方法二:

配置启动项:
notion image
点击
notion image
启动:
notion image

3、运行成功

notion image

4、认识react目录结构

notion image

(1)package.json 包文件,包含项目核心包

notion image

(2)src

保留圈出的两个文件,其他删掉
notion image
index.js,选中部分删掉
notion image
Tips:按住Alt可以多选
App.js改动:
notion image
改动后页面不报错,如下图所示:
notion image
notion image

一、jsx的概念和本质

1、什么是jsx?

notion image

2、jsx优势

3、jsx的本质

二、识别js表达式

三、jsx实现列表渲染

notion image

四、jsx实现条件渲染

1、简单情况的条件渲染

notion image

2、复杂情况的条件渲染

notion image

五、React事件绑定

notion image
notion image
 
上一篇
【react全家桶】week03
下一篇
【react全家桶】week01

评论
Loading...