FIND YOUR NEXT FEW LINES

Results for “default”

Small, practical examples. Search by task or narrow things down below.

239 snippets foundClear filters
TypeScriptArray restructuring

Flatten a single nesting level

TypeScript: flat defaults to a depth of one and creates a new array.

TypeScript✓ Tested
ReactRefs & DOM interaction

Focus an input through a ref

Focus an input through a ref with a small React component and explicit browser behavior.

React✓ Tested
Docker / ComposeContainer lifecycle

Force a disposable container to stop

Docker / Compose: kill sends SIGKILL by default without a graceful shutdown interval.

Docker / Compose✓ Tested
ReactComponents & props

Forward input props to a reusable field

Forward input props to a reusable field with a small React component and explicit browser behavior.

React✓ Tested
PythonMappings & sets

Group records by a field

Python: Accumulate related values with defaultdict without checking whether each group exists.

Python✓ Tested
ReactAccessibility & events

Group related form controls semantically

Group related form controls semantically with a small React component and explicit browser behavior.

React✓ Tested
ReactGetting Started

Group siblings with a fragment

Group siblings with a fragment with a small React component and explicit browser behavior.

React✓ Tested
ReactGetting Started

Handle a button click

Handle a button click with a small React component and explicit browser behavior.

React✓ Tested
jQueryEvents

Handle a form locally

Prevent default form navigation while displaying input with jQuery.

jQuery✓ Tested
ReactGetting Started

Handle a form without navigating

Handle a form without navigating with a small React component and explicit browser behavior.

React✓ Tested
ReactAsync work & status

Handle an asynchronous failure

Handle an asynchronous failure with a small React component and explicit browser behavior.

React✓ Tested
ReactAccessibility & events

Handle an Escape key press

Handle an Escape key press with a small React component and explicit browser behavior.

React✓ Tested