FIND YOUR NEXT FEW LINES

Results for “Components & props”

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

36 snippets foundClear filters
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
ReactComponents & props

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
ReactComponents & props

Connect a reusable label using useId

Connect a reusable label using useId with a small React component and explicit browser behavior.

React✓ Tested
ReactComponents & props

Customize a renderer through a function prop

Customize a renderer through a function prop with a small React component and explicit browser behavior.

React✓ Tested
ReactComponents & props

Destructure nested data in a component

Destructure nested data in a component with a small React component and explicit browser behavior.

React✓ Tested
ReactComponents & props

Notify a parent with a callback prop

Notify a parent with a callback prop with a small React component and explicit browser behavior.

React✓ Tested
ReactComponents & props

Pass an input ref as a React 19 prop

Pass an input ref as a React 19 prop with a small React component and explicit browser behavior.

React✓ Tested
ReactComponents & props

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
ReactComponents & props

Select a component variant explicitly

Select a component variant explicitly with a small React component and explicit browser behavior.

React✓ Tested
PythonFile operations & archives

Extract filename components

Python: Use pathlib properties to separate a directory, filename stem, and suffix.

Python✓ Tested
JavaEncoding & structured values

Inspect components of a URI

Java: Use URI parsing instead of splitting a URL at punctuation manually.

Java✓ Tested
GoFiles & paths

Join portable path components

Join portable path components using a complete Go program with explicit sample inputs.

Go✓ Tested