Why doesn't reactjs batch on animation frame strategy by default?
Asked
Active
Viewed 799 times
0
-
Why should React batch using requestAnimationFrame by default? – Sophie Alpert Jul 21 '14 at 18:19
-
I would guess because that would batch (reduce diff counts) as many operations as possible while still giving full framerate. – ronag Jul 21 '14 at 18:35
-
Note sure if that would give a performance increase. However, if not, I would like to understand why? – ronag Jul 21 '14 at 18:36
1 Answers
0
There's a repo that will do that for you react-raf-batching.
In the Readme, Pete Hunt claims that using requestAnimationFrame makes things harder to test.
A batching strategy for React that's more like a game. This may make your apps more performant but harder to test.

Jared Forsyth
- 12,808
- 7
- 45
- 54