beforeAnimationFrame can be overriden to return a
function that runs before each animation frame is triggered.
This is useful for conditionally setting state changes
on every frame. It is idomatic to call setStateOnAnimationFrame
inside of your callback rather than setState, even though they are
updateOnAnimationFrame queues an update to be run on the next
animation frame. When the animation frame is fired the update will
run to completion. Note that if multiple updates are queued using
updateOnAnimationFrame inbetween frames, the update process will
only be run once.
updateOnIdle forces your component to update. The update
will start on the next idle callback. If shouldAbort is
set to false the component will always finish its update. If
shouldAbort is true and a new update to this component is
queued between idle callbacks, the previous update will abort.
Note that even when shouldAbort is false, if another update
is queued before an existing update starts, the update process will
only be run once. [...]