Results for “reduce”
Small, practical examples. Search by task or narrow things down below.
Centralize state changes in a reducer
Centralize state changes in a reducer 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
Reset reducer state explicitly
Reset reducer state explicitly with a small React component and explicit browser behavior.
React✓ Tested
Respect reduced motion
Disable a CSS animation when the user prefers reduced motion.
CSS✓ Tested
Sum typed values with reduce
Accumulate numeric array elements.
reduce✓ Tested
Calculate derived state during rendering
Calculate derived state during rendering with a small React component and explicit browser behavior.
React✓ Tested
Initialize state lazily
Initialize state lazily with a small React component and explicit browser behavior.
React✓ Tested
Remove an item with filter
Remove an item with filter with a small React component and explicit browser behavior.
React✓ Tested
Share state between sibling controls
Share state between sibling controls with a small React component and explicit browser behavior.
React✓ Tested
Toggle Boolean state
Toggle Boolean state with a small React component and explicit browser behavior.
React✓ Tested
Update a nested object immutably
Update a nested object immutably with a small React component and explicit browser behavior.
React✓ Tested
Update one array item by its identifier
Update one array item by its identifier with a small React component and explicit browser behavior.
React✓ Tested