Inside a 16.67 Millisecond Frame - Kool Codez
tldr; go to the DEMO
Framework or vanilla JS, the browser plays by its own rules. Understanding them can be the difference between a janky mess and a smooth experience.
A Frame in 16.67 Milliseconds
JavaScript runs on a single thread and must yield control to the browser to get anything drawn.
Here is what happens during one frame:
Scripting - The JavaScript engine runs your code.
Style Calculation - The browser figures out which CSS rules apply and computes the final styles, resolving cascades,...
Read more at koolcodez.com