# simple-react **Repository Path**: mirrors_hujiulong/simple-react ## Basic Information - **Project Name**: simple-react - **Description**: simple react - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2020-09-24 - **Last Updated**: 2025-12-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # simple-react [![996.icu](https://img.shields.io/badge/link-996.icu-red.svg)](https://996.icu) 一个极简的React框架,用于说明React实现原理,请不要用于生产环境 实现了JSX,组件,生命周期,diff,setState等核心功能 ## 相关文章 * 分支 [chapter-4](https://github.com/hujiulong/simple-react/tree/chapter-4) - 对应文章:[从零开始实现一个React(四):异步的setState](https://github.com/hujiulong/blog/issues/6) * 分支 [chapter-3](https://github.com/hujiulong/simple-react/tree/chapter-3) - 对应文章:[从零开始实现一个React(三):diff算法](https://github.com/hujiulong/blog/issues/6) * 分支 [chapter-2](https://github.com/hujiulong/simple-react/tree/chapter-2) - 对应文章:[从零开始实现一个React(二):组件和生命周期](https://github.com/hujiulong/blog/issues/5) * 分支 [chapter-1](https://github.com/hujiulong/simple-react/tree/chapter-1) - 对应文章:[从零开始实现一个React(一):JSX和虚拟DOM](https://github.com/hujiulong/blog/issues/4) ## 运行 ```bash git clone https://github.com/hujiulong/simple-react.git cd simple-react npm install npm start ``` ## 使用 为了简单起见,并没有分开库代码和应用代码,可以直接修改`src/index.js`来使用 ```jsx // src/index.js import React from './react' import ReactDOM from './react-dom' class App extends React.Component { render() { return

Hello,World!

; } } ReactDOM.render( , document.getElementById( 'root' ) ); ``` ## LISCENSE MIT