Results for “effects”
Small, practical examples. Search by task or narrow things down below.
Cancel an asynchronous operation on unmount
Cancel an asynchronous operation on unmount with a small React component and explicit browser behavior.
React✓ Tested
Clean up a subscription when a child unmounts
Clean up a subscription when a child unmounts with a small React component and explicit browser behavior.
React✓ Tested
Disable animations for a reduced-motion mode
jQuery: The global fx.off switch causes effects to finish immediately.
jQuery✓ Tested
Measure an element after layout
Measure an element after layout with a small React component and explicit browser behavior.
React✓ Tested
Rerun an effect when its dependency changes
Rerun an effect when its dependency changes with a small React component and explicit browser behavior.
React✓ Tested
Restore the previous document title
Restore the previous document title with a small React component and explicit browser behavior.
React✓ Tested
Schedule a one-time update with cleanup
Schedule a one-time update with cleanup with a small React component and explicit browser behavior.
React✓ Tested
Skip synchronization when a feature is disabled
Skip synchronization when a feature is disabled with a small React component and explicit browser behavior.
React✓ Tested
Subscribe to and clean up a window event
Subscribe to and clean up a window event with a small React component and explicit browser behavior.
React✓ Tested
Update repeatedly with a cleaned-up interval
Update repeatedly with a cleaned-up interval with a small React component and explicit browser behavior.
React✓ Tested
Add calendar days in UTC
JavaScript: Use UTC date setters to cross month boundaries without local daylight-saving effects.
JavaScript✓ Tested
Add calendar days in UTC
TypeScript: Use UTC date setters to cross month boundaries without local daylight-saving effects.
TypeScript✓ Tested