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 the comments of this SO answer.
I'm not sure it's part of React or if people are using it with React.
Can someone tell me what how requestAnimationFrame
is used in React if it is? Or how it can be used with React and why I would choose to use it with React?
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 the comments of this SO answer.
I'm not sure it's part of React or if people are using it with React.
Can someone tell me what how requestAnimationFrame
is used in React if it is? Or how it can be used with React and why I would choose to use it with React?
1 Answer
Reset to default 20React 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.
setTimeout
andsetInterval
. – Frank van Puffelen Commented Jan 25, 2014 at 17:05requestAnimationFrame
in an interview in August 2013. The recording and transcript are available: javascriptjabber.com/… – Ross Allen Commented Jan 25, 2014 at 17:52