big-react icon indicating copy to clipboard operation
big-react copied to clipboard

跟着我,从0实现React18

Results 18 big-react issues
Sort by recently updated
recently updated
newest added

增加 jsconfig.json 配置方便阅读代码时在各个模块之间跳转。 参考:https://github.com/microsoft/vscode/issues/16320

Hey, stumbled upon this repo. This looks fantastic, as I went through the website a bit with a translator. I think, lots of people would benefit from learning all of...

[https://github.com/BetaSu/big-react/blob/master/packages/react-reconciler/src/updateQueue.ts](url)文件下,测试的组件就为批处理那节所写的组件,num初始值为100,click事件里有三个setNum,传入一个函数,返回num+1。在我测试的时候结果是101,按理来说是103,查看了一下processUpdateQueue,发现每次传进来的baseState都为100,应该在每次处理完update后将newState赋值给baseState,供下一个update的使用,这样结果就是103。请大佬指点一下,是我理解错了还是应该是这样的。

![QQ截图20230513144101](https://github.com/BetaSu/big-react/assets/90550975/3329610c-0d36-4561-bb1f-97d0f9901960) 如果更新一个高优先级的任务,那么会触发update,执行ensureRootIsScheduled,在里面已经加入了performConcurrentWorkOnRoot。 然后在图中也就是上一次的performConcurrentWorkOnRoot又执行了一次ensureRootIsScheduled。那么performConcurrentWorkOnRoot是不是被重复添加了两次? ![QQ截图20230513144318](https://github.com/BetaSu/big-react/assets/90550975/31b50c42-99ab-4d30-b206-070b67b2802c)

Bumps [postcss](https://github.com/postcss/postcss) from 8.4.19 to 8.4.31. Release notes Sourced from postcss's releases. 8.4.31 Fixed \r parsing to fix CVE-2023-44270. 8.4.30 Improved source map performance (by @​romainmenke). 8.4.29 Fixed Node#source.offset (by...

dependencies

[https://github.com/BetaSu/big-react/blob/master/packages/react-reconciler/src/updateQueue.ts](https://github.com/BetaSu/big-react/blob/master/packages/react-reconciler/src/updateQueue.ts) 大佬这个文件中`processUpdateQueue`目前计算时, basicStateReducer(baseState, action) 感觉地方不应该用baseState而是我们计算出的新的newState

请可以运行这个例子,[https://codesandbox.io/s/relaxed-ace-m9x292?file=/App.js](url) 点击后组件的destory执行顺序为 ![image](https://github.com/BetaSu/big-react/assets/26951062/0f6b051a-8e13-4a41-b1c4-24d90d7679d8)。 而在本项目中执行顺序与官方实现不一致,下图为本项目中的打印顺序为 ![image](https://github.com/BetaSu/big-react/assets/26951062/30f4b2ce-a7a2-4c70-8283-e71025be2d86) 官方实现在没有标记的ChildDeletion的组件会先执行 commitPassiveUnmountEffects_complete(), 从而执行destory方法。并不是像我们实现的直接先执行所有要删除组件的destory。

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 3.2.4 to 3.2.7. Changelog Sourced from vite's changelog. 3.2.7 (2023-05-26) fix: port #13348 to v3, fs.deny with leading double slash (#13349) (0574f80), closes #13348 #13349 3.2.6 (2023-04-18)...

dependencies