Giter Club home page Giter Club logo

big-react's Introduction

Big-React

从零实现 React v18 🎉🎉🎉

没什么比自己亲手造个React18更能加深理解的了

TODO List

工程类需求

类型 内容 完成情况 在哪个版本实现的
架构 monorepo(pnpm 实现) v1
规范 eslint v1
规范 prettier v1
规范 commitlint + husky v1
规范 lint-staged v1
规范 tsc v1
测试 jest 环境搭建 ⬜️
规范 tsc v1
构建 babel 配置 ⬜️
构建 Dev 环境包的构建 v1
构建 Prod 环境包的构建 ⬜️
部署 Github Action 执行 lint 与 test ⬜️
部署 Github Action 根据 tag 发布 npm 包 ⬜️

框架需求

类型 内容 完成情况 在哪个版本实现的
React JSX 转换 v1
ReactDOM 浏览器环境 DOM 的增/删/改 ⬜️
ReactNoop ReactNoop Renderer ⬜️
Reconciler Fiber 架构 v1
Reconciler 事件模型 ⬜️
Reconciler Lane 模型 ⬜️
Reconciler 基础 Update 机制 v1
Reconciler 带优先级的 Update 机制 ⬜️
Reconciler 插入单节点的 reconcile 流程 v1
Reconciler 插入多节点的 reconcile 流程 ⬜️
Reconciler 删除节点的 reconcile 流程 ⬜️
Reconciler HostText 类型支持
Reconciler HostComponent 类型支持 v1
Reconciler HostRoot 类型支持 v1
Reconciler FunctionComponent 类型支持 ⬜️
Reconciler 同步调度流程 ⬜️
Reconciler 异步调度流程 ⬜️

调试

主要调试方式包括两个:

  1. 跑用例

React官方的测试用例(还未实现,需要先实现ReactNoop渲染器)

  1. pnpm link

通过CRAVite起一个React测试项目后,在本项目执行pnpm run build:dev打包reactreact-dom,在测试项目中通过pnpm link将项目依赖的reactreact-dom替换为我们打包的reactreact-dom

更新日志

插入单节点的 render 阶段 mount 流程,包括如下功能:

  • JSX 转换
  • Fiber 架构
  • 插入单节点的 reconcile 流程
  • HostComponent 类型支持
  • HostRoot 类型支持

注:还未实现浏览器环境下的渲染

big-react's People

Contributors

betasu avatar dependabot[bot] 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.