4. Learn a framework Vue/React/Sveltejs
Opened this issue · 3 comments
xingangshi commented
4. Learn a framework Vue/React/Sveltejs
xingangshi commented
- [[https://pomb.us/build-your-own-react/][Build your own React]]
xingangshi commented
xingangshi commented
关于 React 的学习
1. 准备工作
- Node/NPM
- 一个适合的编辑器,比如 Visual Studio Code
- Git(在 Git-SCM 安装它并在 Github.com 创建一个免费帐户)
2. 创建 React 项目
# for Create React App
npx create-react-app my-react-app
# for Vite
npm init vite@latest my-react-app --template react
# for Next.js
npx create
3. 沙盒工具
4. React 概念
JSX
Components (specifically function components)
Props and state
Lists, keys, and events
Core React Hooks, primarily useState, useEffect
React Context, including useContext
How to write custom React hooks
Rendering and re-rendering (especially knowing what can cause a re-render)
Pure functions
Side effects
Immutability