Results for “default”
Small, practical examples. Search by task or narrow things down below.
Allow a long flex child to shrink inside its container
CSS: Min-width zero removes the default content-size floor so local overflow handling can take effect.
CSS✓ Tested
Announce a status update politely
Announce a status update politely with a small React component and explicit browser behavior.
React✓ Tested
Append to an array without mutating state
Append to an array without mutating state with a small React component and explicit browser behavior.
React✓ Tested
Assign a CSS class in JSX
Assign a CSS class in JSX with a small React component and explicit browser behavior.
React✓ Tested
Block scripts in an embedded document
HTML: An empty sandbox attribute applies the default set of restrictions, including blocking script execution.
HTML✓ Tested
Build a minimum-priority queue
C++: Supply greater as the comparator because priority_queue defaults to the largest value first.
C++✓ Tested
Calculate a value inside JSX
Calculate a value inside JSX with a small React component and explicit browser behavior.
React✓ Tested
Calculate derived state during rendering
Calculate derived state during rendering with a small React component and explicit browser behavior.
React✓ Tested
Cancel an asynchronous operation on unmount
Cancel an asynchronous operation on unmount with a small React component and explicit browser behavior.
React✓ Tested
Centralize state changes in a reducer
Centralize state changes in a reducer with a small React component and explicit browser behavior.
React✓ Tested
Choose between two render branches
Choose between two render branches with a small React component and explicit browser behavior.
React✓ Tested
Choose labels from a language context
Choose labels from a language context with a small React component and explicit browser behavior.
React✓ Tested