You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main idea here is that user may turn on and off tracking if react-stick is placed outside the viewport (with his own preferred technique).
Proposal
Add property disableTracking to allow user disable tracking.
Or, which is worse from compatibility POV, rename property updateOnAnimationFrame to updateOn with values:
idleCallback (default)
animationFrame
never
Why?
Right now watcher constantly tracks position of the anchor, taking up to 50% CPU performance in idleCallbacks in case of 200 react-stick instances (on my PC). Even if node itself is hidden (null)!
This may be seen straight on demo page. In case sticky node visible CPU usage goes twice higher.
The text was updated successfully, but these errors were encountered:
Hi @frontendphil
The main idea here is that user may turn on and off tracking if react-stick is placed outside the viewport (with his own preferred technique).
Proposal
Add property
disableTracking
to allow user disable tracking.Or, which is worse from compatibility POV, rename property
updateOnAnimationFrame
toupdateOn
with values:Why?
Right now watcher constantly tracks position of the anchor, taking up to 50% CPU performance in idleCallbacks in case of 200 react-stick instances (on my PC). Even if node itself is hidden (null)!
This may be seen straight on demo page. In case sticky node visible CPU usage goes twice higher.
The text was updated successfully, but these errors were encountered: