Code Monkey home page Code Monkey logo

big-react's People

Contributors

betasu avatar dependabot[bot] avatar kitten9533 avatar l-qun avatar linjunc avatar snqb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

big-react's Issues

useEffect的执行问题

请可以运行这个例子,https://codesandbox.io/s/relaxed-ace-m9x292?file=/App.js 点击后组件的destory执行顺序为
image

而在本项目中执行顺序与官方实现不一致,下图为本项目中的打印顺序为
image

官方实现在没有标记的ChildDeletion的组件会先执行 commitPassiveUnmountEffects_complete(), 从而执行destory方法。并不是像我们实现的直接先执行所有要删除组件的destory。

a confused about performConcurrentWorkOnRoot , looking for your help !

QQ截图20230513144101
如果更新一个高优先级的任务,那么会触发update,执行ensureRootIsScheduled,在里面已经加入了performConcurrentWorkOnRoot。
然后在图中也就是上一次的performConcurrentWorkOnRoot又执行了一次ensureRootIsScheduled。那么performConcurrentWorkOnRoot是不是被重复添加了两次?
QQ截图20230513144318

English translation

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 these concepts.
Is there English version planned for this?
Went through some of the forks -- could not find one.

updateState中代码勘误

function updateState(): [State, Dispatch] {
// ...
let baseQueue = current.baseQueue;
// ...
}
let baseQueue = current.baseQueue;
应该改成
let baseQueue =hook.baseQueue;

当我完成并发更新去测试批处理时,processUpdateQueue的计算问题

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

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.