gpt4 book ai didi

reactjs - RCTDirectEventBlock 与 RCTBubblingEventBlock

转载 作者:行者123 更新时间:2023-12-03 13:27:28 26 4
gpt4 key购买 nike

RCTDirectEventBlockRCTBubblingEventBlock 有什么区别?

最佳答案

似乎没有太多官方文档,Facebook 已关闭并锁定了要求提供更好文档的问题。我发现的一个有用的文档表明这纯粹是一种风格上的差异:

Bubbling events are like DOM events so that a parent component can capture an event fired by its child. Generally these are UI-related, like "the user touched this box". Direct events are not bubbled and are intended for more abstract events like "this image failed to load".

通过此备忘单:https://gist.github.com/chourobin/f83f3b3a6fd2053fad29fff69524f91c

关于reactjs - RCTDirectEventBlock 与 RCTBubblingEventBlock,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47294369/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com