react源码调试

clone源码

git clone https://github.com/facebook/react.git

安装依赖

cd react
yarn 

build源码

npm run build react/index,react/jsx,react-dom/index,scheduler --type=NODE

为源码创建软链

cd build/node_modules/react
npm link
cd build/node_modules/react-dom
npm link

create-react-app创建项目

npx create-react-app demo
cd demo
npm link react react-dom

你可能感兴趣的:(react源码调试)