Timing accuracy in React

78 Views Asked by At

I am considering using React to run behavioural studies on the web. Such studies require knowing exactly when elements such as images are displayed on screen, and being able to accurately specify the duration they are shown (eg via requestAnimationFrame).

I would love to use React but I worry that it is not fit for my purpose given this from the official documentation:

There is no guarantee of synchronous operation of calls to setState and calls may be batched for performance gains (source)

I appreciate your advice.

0

There are 0 best solutions below