Results for “prop”
Small, practical examples. Search by task or narrow things down below.
Compose a component with named content slots
Compose a component with named content slots with a small React component and explicit browser behavior.
React✓ Tested
Connect a reusable label using useId
Connect a reusable label using useId with a small React component and explicit browser behavior.
React✓ Tested
Destructure nested data in a component
Destructure nested data in a component with a small React component and explicit browser behavior.
React✓ Tested
Disable a button
Set the live disabled property with jQuery prop.
jQuery✓ Tested
Distinguish current state from initial markup
jQuery: prop reads the live checked state; attr reads the original checked attribute.
jQuery✓ Tested
Reset child state by changing its key
Reset child state by changing its key with a small React component and explicit browser behavior.
React✓ Tested
Select a component variant explicitly
Select a component variant explicitly with a small React component and explicit browser behavior.
React✓ Tested
Select fields with the Pick utility type
Expose a smaller view of a larger object type.
Pick✓ Tested
Stop a child event from reaching its parent
jQuery: stopPropagation leaves other handlers on the same element intact.
jQuery✓ Tested
Stop a nested click from reaching its parent
Stop a nested click from reaching its parent with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Stop an event from reaching a parent handler
Stop an event from reaching a parent handler with a small React component and explicit browser behavior.
React✓ Tested
Build an object from key-value entries
JavaScript: Object.fromEntries converts an iterable of pairs into ordinary own properties.
JavaScript✓ Tested