Does React use requestAnimationFrame? If so, how does it use it?

后端 未结 1 1054
你的背包
你的背包 2020-12-16 11:35

I found 2 sources where it kind of says that React is using requestAnimationFrame On this blog post about Om, a ClojureScript framework on top of React. Also on

相关标签:
1条回答
  • 2020-12-16 12:05

    React doesn't currently use requestAnimationFrame to do DOM updates (as we call it, the "batching strategy"). The batching strategy is injectible though so it's possible to use something else. Om makes use of that possibility and uses requestAnimationFrame to batch DOM updates.

    0 讨论(0)
提交回复
热议问题