前言
React 18.0[1] 已经发布一段时间了
所以这两天抽空重新完整的过了一遍 React
我将所有内容整理为以下86
张脑图,方便以后查阅
附原图和源文件:
原图和源文件(包括xmind
和pos
文件)已上传 github[2],如有需要可自行下载:https://github.com/jCodeLife/mind-map/tree/master/React
86张脑图
1. 安装
![4630f7cbf911eab2c84606e86e6364e6.png](https://img-blog.csdnimg.cn/img_convert/4630f7cbf911eab2c84606e86e6364e6.png)
2. 核心概念
JSX 简介
![433f761c76158e7bd4ece0f465afd2e6.png](https://img-blog.csdnimg.cn/img_convert/433f761c76158e7bd4ece0f465afd2e6.png)
2.2元素渲染
![322e0fd79188f0c52291c35929eeb54c.png](https://img-blog.csdnimg.cn/img_convert/322e0fd79188f0c52291c35929eeb54c.png)
2.3组件 & Props
![2c0c41601a02a4eee4b87cc2c0f6a4fa.png](https://img-blog.csdnimg.cn/img_convert/2c0c41601a02a4eee4b87cc2c0f6a4fa.png)
2.4.1State & 生命周期
![5313d46e08f1f57adff5af757f27501e.png](https://img-blog.csdnimg.cn/img_convert/5313d46e08f1f57adff5af757f27501e.png)
2.4.2数据流和正确使用State
![c0c0bd387f2e0d25c05a2b2444be27af.png](https://img-blog.csdnimg.cn/img_convert/c0c0bd387f2e0d25c05a2b2444be27af.png)
2.5事件处理
![e487058f508560ceb80e9a144df5887e.png](https://img-blog.csdnimg.cn/img_convert/e487058f508560ceb80e9a144df5887e.png)
2.6条件渲染
![f0deaa6aae760a56940d800810e4695d.png](https://img-blog.csdnimg.cn/img_convert/f0deaa6aae760a56940d800810e4695d.png)
2.7列表 & Key
![bf0eb46c71e17d4484fa214271ff211f.png](https://img-blog.csdnimg.cn/img_convert/bf0eb46c71e17d4484fa214271ff211f.png)
2.8表单
![b97d7f02d6107e6ae9d0b4237994d58f.png](https://img-blog.csdnimg.cn/img_convert/b97d7f02d6107e6ae9d0b4237994d58f.png)
2.9状态提升
![4cae8415521931994885d5f64d43d559.png](https://img-blog.csdnimg.cn/img_convert/4cae8415521931994885d5f64d43d559.png)
2.10组合 vs 继承
![933aa501230fd283d86f7171f6cc66b7.png](https://img-blog.csdnimg.cn/img_convert/933aa501230fd283d86f7171f6cc66b7.png)
2.11React 哲学
![98c1da3f53e517d12c2eaaed6a8e7e0b.png](https://img-blog.csdnimg.cn/img_convert/98c1da3f53e517d12c2eaaed6a8e7e0b.png)
3. 高级指引
3.1无障碍辅助功能
![c5939cfbb484f881d761a6905c01af6f.png](https://img-blog.csdnimg.cn/img_convert/c5939cfbb484f881d761a6905c01af6f.png)
3.2代码分割
![7c0da725b5da2fc1a4ec02ba9a235586.png](https://img-blog.csdnimg.cn/img_convert/7c0da725b5da2fc1a4ec02ba9a235586.png)
3.3.1Context
![c8c24ec4007dd95171f90d6259a0102a.png](https://img-blog.csdnimg.cn/img_convert/c8c24ec4007dd95171f90d6259a0102a.png)
3.3.2Context API
![b590e0d60939a6593d105b3c3c1e9d4a.png](https://img-blog.csdnimg.cn/img_convert/b590e0d60939a6593d105b3c3c1e9d4a.png)
3.4错误边界
![c6a29530db4092005e473fb9003c6723.png](https://img-blog.csdnimg.cn/img_convert/c6a29530db4092005e473fb9003c6723.png)
3.5Refs 转发
![cc76d677767de00a957712fbe4328072.png](https://img-blog.csdnimg.cn/img_convert/cc76d677767de00a957712fbe4328072.png)
3.6Fragments
![89ae80f27e2b53915248ef91d35a9383.png](https://img-blog.csdnimg.cn/img_convert/89ae80f27e2b53915248ef91d35a9383.png)
3.7高阶组件
![3386dac94d6f551bb7e3862406866655.png](https://img-blog.csdnimg.cn/img_convert/3386dac94d6f551bb7e3862406866655.png)
3.8.1集成带有 DOM 操作的插件
![7794a4088dad7c9546d3e4255c8eac8c.png](https://img-blog.csdnimg.cn/img_convert/7794a4088dad7c9546d3e4255c8eac8c.png)
3.8.2与其他第三方库协同
![e4f55e92d1bfeaa8fa48b092e332c93d.png](https://img-blog.csdnimg.cn/img_convert/e4f55e92d1bfeaa8fa48b092e332c93d.png)
3.9.1JSX 本质
![c0a3fbbd51fa76757884186005f860e5.png](https://img-blog.csdnimg.cn/img_convert/c0a3fbbd51fa76757884186005f860e5.png)
3.9.2JSX 指定 React 元素类型
![c7ca575bd535891b74615c9b2486b859.png](https://img-blog.csdnimg.cn/img_convert/c7ca575bd535891b74615c9b2486b859.png)
3.9.3JSX 中指定 props
![22db47d00da8b07b02fc594cc871fef0.png](https://img-blog.csdnimg.cn/img_convert/22db47d00da8b07b02fc594cc871fef0.png)
3.9.4JSX 中的子元素
![8d58a6bb953ac45d0edabb05f17a50d9.png](https://img-blog.csdnimg.cn/img_convert/8d58a6bb953ac45d0edabb05f17a50d9.png)
3.10.1性能优化之生产版本
![8fb467f7dc14b9670c0fc21adb2b9edf.png](https://img-blog.csdnimg.cn/img_convert/8fb467f7dc14b9670c0fc21adb2b9edf.png)
3.10.2使用 Chrome Performance 标签分析组件
![bd215da327db7f6ab2bd36e2091d30be.png](https://img-blog.csdnimg.cn/img_convert/bd215da327db7f6ab2bd36e2091d30be.png)
3.10.3使用开发者工具中的分析器对组件进行分析
![648fe6e8eae4057d4186353e58a43b74.png](https://img-blog.csdnimg.cn/img_convert/648fe6e8eae4057d4186353e58a43b74.png)
3.10.4其他优化
![89067837d6b3fb9b908970043cabd0dc.png](https://img-blog.csdnimg.cn/img_convert/89067837d6b3fb9b908970043cabd0dc.png)
3.11Portals
![57fa0b4f4eafc32830cc805d690a0b9b.png](https://img-blog.csdnimg.cn/img_convert/57fa0b4f4eafc32830cc805d690a0b9b.png)
3.12Profiler API
![df713771b4b00dee947b46d771d9026a.png](https://img-blog.csdnimg.cn/img_convert/df713771b4b00dee947b46d771d9026a.png)
3.13不使用 ES6
![fae57bef1d10cf9a0c34a61e89d5cc30.png](https://img-blog.csdnimg.cn/img_convert/fae57bef1d10cf9a0c34a61e89d5cc30.png)
3.14不使用 JSX
![fb39ba74a4ef1a56fee31979fe25a754.png](https://img-blog.csdnimg.cn/img_convert/fb39ba74a4ef1a56fee31979fe25a754.png)
[3.15协调
![0e1f4c118a7c863f216133b861eddafe.png](https://img-blog.csdnimg.cn/img_convert/0e1f4c118a7c863f216133b861eddafe.png)
3.16Refs & DOM
![636f0527abf4bdb91c7b55e4ca826595.png](https://img-blog.csdnimg.cn/img_convert/636f0527abf4bdb91c7b55e4ca826595.png)
3.17Render Props
![1f155bdc43d6acc6e5a9c8e2d42431d1.png](https://img-blog.csdnimg.cn/img_convert/1f155bdc43d6acc6e5a9c8e2d42431d1.png)
3.18.1静态类型检查之Flow
![204084572ab1543033703392fa95adf4.png](https://img-blog.csdnimg.cn/img_convert/204084572ab1543033703392fa95adf4.png)
3.18.2静态类型检查之TypeScript
![84125602cfc512e809f3cf840382a826.png](https://img-blog.csdnimg.cn/img_convert/84125602cfc512e809f3cf840382a826.png)
3.18.2静态类型检查之其他
![d5dbd6006f8a5e72400541f915292d30.png](https://img-blog.csdnimg.cn/img_convert/d5dbd6006f8a5e72400541f915292d30.png)
3.19严格模式
![896f8e6f4d9efad901b2bc5ad55d981d.png](https://img-blog.csdnimg.cn/img_convert/896f8e6f4d9efad901b2bc5ad55d981d.png)
3.20使用 PropTypes 进行类型检查
![5fdc781ee32dcb0705dda98fb3da7af2.png](https://img-blog.csdnimg.cn/img_convert/5fdc781ee32dcb0705dda98fb3da7af2.png)
3.21非受控组件
![09e126021edb0fc59891eb64ea5c2d1e.png](https://img-blog.csdnimg.cn/img_convert/09e126021edb0fc59891eb64ea5c2d1e.png)
3.22Web Components
![5dc1b62cad3bb6b46f795290fcfb5b76.png](https://img-blog.csdnimg.cn/img_convert/5dc1b62cad3bb6b46f795290fcfb5b76.png)
4. API 参考
4.1.1React 顶层 API之概览
![e0169edf9369ebe269ffda3d99a466b5.png](https://img-blog.csdnimg.cn/img_convert/e0169edf9369ebe269ffda3d99a466b5.png)
4.1.2React 顶层 API之参考
![09814a05e874311c20311859aa4c8f45.png](https://img-blog.csdnimg.cn/img_convert/09814a05e874311c20311859aa4c8f45.png)
4.1.3React 顶层 API之参考2
![bde2610f8dd8d1fe7b8aebfe8efa1c27.png](https://img-blog.csdnimg.cn/img_convert/bde2610f8dd8d1fe7b8aebfe8efa1c27.png)
4.2.1React.Component之概述
![b86a2e0ae16ba15eb72013e4c54b0e1e.png](https://img-blog.csdnimg.cn/img_convert/b86a2e0ae16ba15eb72013e4c54b0e1e.png)
4.2.2常用的生命周期方法
![02e0b90ffd6b99723ca25d909e3d4cf6.png](https://img-blog.csdnimg.cn/img_convert/02e0b90ffd6b99723ca25d909e3d4cf6.png)
4.2.3不常用的生命周期方法
![2a4e03cf755cd6a3778cf3bb742421dd.png](https://img-blog.csdnimg.cn/img_convert/2a4e03cf755cd6a3778cf3bb742421dd.png)
4.2.4其他 API
![d7cafd7bcab75d7e08c50bf155cb64f8.png](https://img-blog.csdnimg.cn/img_convert/d7cafd7bcab75d7e08c50bf155cb64f8.png)
4.2.5Class 属性和实例属性
![237f55fd317721f0911fef0c558824b4.png](https://img-blog.csdnimg.cn/img_convert/237f55fd317721f0911fef0c558824b4.png)
4.3ReactDOM
![cbbe3156e686fb1d8bd0f8871513bfca.png](https://img-blog.csdnimg.cn/img_convert/cbbe3156e686fb1d8bd0f8871513bfca.png)
4.4ReactDOMClient
![504554b62fee7a347e0a64fa004a8fa9.png](https://img-blog.csdnimg.cn/img_convert/504554b62fee7a347e0a64fa004a8fa9.png)
4.5ReactDOMServer
![04065b9db9c14aee8d906710f7dad7a3.png](https://img-blog.csdnimg.cn/img_convert/04065b9db9c14aee8d906710f7dad7a3.png)
4.6DOM 元素
![52e7036a7acbd671b36e345f3f8e4bb0.png](https://img-blog.csdnimg.cn/img_convert/52e7036a7acbd671b36e345f3f8e4bb0.png)
4.7.1合成事件
![0bd0701a6b914478e038d0eaf4026d5a.png](https://img-blog.csdnimg.cn/img_convert/0bd0701a6b914478e038d0eaf4026d5a.png)
4.7.2支持的事件
![363bc6c327ea0dfed1d64cbb3ab260ab.png](https://img-blog.csdnimg.cn/img_convert/363bc6c327ea0dfed1d64cbb3ab260ab.png)
4.7.3支持的事件2
![19ac65ed79a3540c39631be660497dc7.png](https://img-blog.csdnimg.cn/img_convert/19ac65ed79a3540c39631be660497dc7.png)
4.7.4支持的事件3
![f0a23c3c89f3d2c8fec847e76e4b8747.png](https://img-blog.csdnimg.cn/img_convert/f0a23c3c89f3d2c8fec847e76e4b8747.png)
4.8Test Utilities
![c123cde9f57dd5346d2e73887fbe0d3d.png](https://img-blog.csdnimg.cn/img_convert/c123cde9f57dd5346d2e73887fbe0d3d.png)
4.9Test Renderer
![564505de072243e4c4d9b9aaca504d05.png](https://img-blog.csdnimg.cn/img_convert/564505de072243e4c4d9b9aaca504d05.png)
4.10JS 环境要求
![49ac75df4371a414e21260921b9ea015.png](https://img-blog.csdnimg.cn/img_convert/49ac75df4371a414e21260921b9ea015.png)
4.11React 术语词
![e307e54d0b1ea64b7ea82dee797832e6.png](https://img-blog.csdnimg.cn/img_convert/e307e54d0b1ea64b7ea82dee797832e6.png)
5. Hook
5.1Hook 简介
![ce8cdc1c1c6e58666cce77580979026c.png](https://img-blog.csdnimg.cn/img_convert/ce8cdc1c1c6e58666cce77580979026c.png)
5.2Hook 概览
![b295932c825d18be939103679770ba2b.png](https://img-blog.csdnimg.cn/img_convert/b295932c825d18be939103679770ba2b.png)
5.3使用 State Hook
![fd6e16268f203331a603de5f6f557f26.png](https://img-blog.csdnimg.cn/img_convert/fd6e16268f203331a603de5f6f557f26.png)
5.4使用 Effect Hook
![0d41733eed5a9ab5e554585d2af7de37.png](https://img-blog.csdnimg.cn/img_convert/0d41733eed5a9ab5e554585d2af7de37.png)
5.5Hook 规则
![99ddf827810178066524be7f4e589f3d.png](https://img-blog.csdnimg.cn/img_convert/99ddf827810178066524be7f4e589f3d.png)
5.6自定义
![3b9e30f97abab73ab93560b748107ca4.png](https://img-blog.csdnimg.cn/img_convert/3b9e30f97abab73ab93560b748107ca4.png)
Hook API
![776a5b2914ce3573c387beafc60b218b.png](https://img-blog.csdnimg.cn/img_convert/776a5b2914ce3573c387beafc60b218b.png)
5.8.1Hooks FAQ之采纳策略
![7744b85f6566f6ebb37cf4df883923b0.png](https://img-blog.csdnimg.cn/img_convert/7744b85f6566f6ebb37cf4df883923b0.png)
5.8.2Hooks FAQ之从 Class 迁移到 Hook
![b3a0e92190c915a482f273ca6cb73e04.png](https://img-blog.csdnimg.cn/img_convert/b3a0e92190c915a482f273ca6cb73e04.png)
5.8.3Hooks FAQ之性能优化
![dcce60896f7972ebfbb5062fe34e0795.png](https://img-blog.csdnimg.cn/img_convert/dcce60896f7972ebfbb5062fe34e0795.png)
5.8.4Hooks FAQ之底层原理
![35462b834d9a32020e24d7ef6c712f93.png](https://img-blog.csdnimg.cn/img_convert/35462b834d9a32020e24d7ef6c712f93.png)
6. 测试
6.1测试概览
![a6b540b6e2a8d9a4135160438613f9aa.png](https://img-blog.csdnimg.cn/img_convert/a6b540b6e2a8d9a4135160438613f9aa.png)
6.2测试技巧
![84da6d7b041bad060c9bc367377a0109.png](https://img-blog.csdnimg.cn/img_convert/84da6d7b041bad060c9bc367377a0109.png)
6.3测试环境
![8069ead74a32244b1dc92638bef7d499.png](https://img-blog.csdnimg.cn/img_convert/8069ead74a32244b1dc92638bef7d499.png)
7. FAQ
7.1AJAX 及 APIs
![e5f811149253831f9c8ac147f832e3f1.png](https://img-blog.csdnimg.cn/img_convert/e5f811149253831f9c8ac147f832e3f1.png)
7.2Babel,JSX 及构建过程
![126e077b6776cf12ebb4989f10b4b349.png](https://img-blog.csdnimg.cn/img_convert/126e077b6776cf12ebb4989f10b4b349.png)
7.3传递函数给组件
![d45d0997c2dc3f27f9c140cd722d0ca7.png](https://img-blog.csdnimg.cn/img_convert/d45d0997c2dc3f27f9c140cd722d0ca7.png)
[7.4组件状态.png
![21136822f7133dfc1c8c59555324fc7f.png](https://img-blog.csdnimg.cn/img_convert/21136822f7133dfc1c8c59555324fc7f.png)
7.5样式与 CSS.png
![2444f71b10fe010d829969b6ac0d0a0f.png](https://img-blog.csdnimg.cn/img_convert/2444f71b10fe010d829969b6ac0d0a0f.png)
7.6项目文件结构
![4315c680baa0004ddc819129997f7547.png](https://img-blog.csdnimg.cn/img_convert/4315c680baa0004ddc819129997f7547.png)
7.7Virtual DOM 及内核
![e9f12b4603534f1e2dfdf41e6a6bc6b9.png](https://img-blog.csdnimg.cn/img_convert/e9f12b4603534f1e2dfdf41e6a6bc6b9.png)
结语
最后, 送人玫瑰,手留余香,觉得有收获的朋友可以点赞,关注一波 ,我们组建了高级前端交流群,如果您热爱技术,想一起讨论技术,交流进步,不管是面试题,工作中的问题,难点热点都可以在交流群交流,为了拿到大Offer,邀请您进群,入群就送前端精选100本电子书以及 阿里面试前端精选资料 添加 下方小助手二维码或者扫描二维码 就可以进群。让我们一起学习进步.
推荐阅读
(点击标题可跳转阅读)
[面试必问]-你不知道的 React Hooks 那些糟心事
[面试必问]-全网最全 React16.0-16.8 特性总结
[架构分享]- 微前端qiankun+docker+nginx自动化部署
觉得本文对你有帮助?请分享给更多人
关注「React中文社区」加星标,每天进步