// @file src/react/packages/scheduler/src/Scheduler.js
export * from './src/SchedulerHostConfig.js';
// @file src/react/packages/scheduler/src/SchedulerHostConfig.js
// 添加以下
export {
unstable_flushAllWithoutAsserting,
unstable_flushNumberOfYields,
unstable_flushExpired,
unstable_clearYields,
unstable_flushUntilNextPaint,
unstable_flushAll,
unstable_yieldValue,
unstable_advanceTime
} from './forks/SchedulerHostConfig.mock.js';
export {
requestHostCallback,
requestHostTimeout,
cancelHostTimeout,
shouldYieldToHost,
getCurrentTime,
forceFrameRate,
requestPaint
} from './forks/SchedulerHostConfig.default.js';
网上找了好多debug react的文章,在17上都不好使;在其他前辈们的基础上,进行了自己的尝试,记录下来,算是个开头,使用的是yarn不是npm哈。
create-react-app study-reactcd study-react && yarn ejectyarn start,确保现在的项目是可以run起来的,结果TMD报错:yarn add -D @babel/plugin-syntax-jsxyarn start,这次跑起来了,打开浏览器输入:http://localhost:3000/,可以看到如下界面:git submodule add [email protected]:facebook/react.git,然后切换分支:cd react && git checkout tags/v17.0.0 -b v17.0.0yarn start,编译报错:yarn start;yarn start后,发现还是报错yarn start,看浏览器:yeah,成功了!!!