GithubHelp home page GithubHelp logo

jiuriend / react-illustration-series Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 7kms/react-illustration-series

1.0 0.0 0.0 26.07 MB

图解react源码, 用大量配图的方式, 致力于将react原理表述清楚.

TypeScript 100.00%

react-illustration-series's Introduction

图解 React 原理系列

react原理, 基于[email protected](尽可能跟随 react 版本的升级, 持续更新). 用大量配图的方式, 致力于将react原理表述清楚.

使用指南

  1. 本系列以 react 核心包结构和运行机制为主线索进行展开. 包括react 宏观结构, react 工作循环, react 启动模式, react fiber原理, react hook原理, react 合成事件等核心内容.
  2. 开源作品需要社区的净化和参与, 如有表述不清晰或表述错误, 欢迎issue 勘误. 如果对你有帮助, 请不吝 star.
  3. 本系列最初写作于 2020 年 6 月(当时稳定版本是 v16.13.1), 随着 react 官方的升级, 本 repo 会将主要版本的文章保存在以版本号命名的分支中, 当前master分支同步v17.0.1. 部分文章未更新, 可以参照v16.13.1分支.
  4. 当下前端技术圈总体比较浮躁, 各技术平台充斥着不少"标题党". 真正对于技术本身, 不能急于求成, 需要静下心来修炼.
  5. 本系列不是面经, 但会列举一些面试题来加深对 react 理解.
  6. 本系列所有内容皆为原创, 如需转载, 请注明出处.

适用读者

  1. react,react-dom开发 web 应用有实践经验.
  2. 期望深入理解react内在作用原理.

重要更新

react@17 到目前(2021 年 02 月 22 日)共有 2 个版本的发布([email protected], [email protected]), 其中v17.0.0作为主版本升级(具体变动详见官方更新日志)相较于 16.x 版本, 在使用层面基本维持不变, 在源码层面需要关注的重大的变动如下

重大变动 所属板块 官方解释
重构Fiber.expirationTime并引入Fiber.lanes react-reconciler Initial Lanes implementation #18796
事件代理节点从 document 变成 rootNode, 取消合成事件的缓存池等 legacy-events(被移除), react-dom/events changes-to-event-delegation

主要类容

基本概念

运行核心

数据管理

  • 状态组件(class)
  • 状态组件(function)
  • hook 原理(useState)(17.0.1 分支未完成, 可以参考 v16.13.1 分支中的分析)
  • hook 原理(useEffect)(17.0.1 分支未完成, 可以参考 v16.13.1 分支中的分析)
  • context 原理(17.0.1 分支未完成, 可以参考 v16.13.1 分支中的分析)

交互

  • 合成事件原理(17.0.1 分支未完成, 可以参考 v16.13.1 分支中的分析)

高频算法

历史版本

react-illustration-series's People

Contributors

7kms avatar imgbotapp avatar tangliang1 avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.