FIND YOUR NEXT FEW LINES

Results for “try”

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

176 snippets foundClear filters
ReactAccessibility & events

Handle an Escape key press

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

React✓ Tested
CSSBox dimensions & overflow

Hide an element while keeping its space

CSS: Visibility hidden preserves layout geometry even though the element is not painted.

CSS✓ Tested
ReactAsync work & status

Ignore a result after its effect is cleaned up

Ignore a result after its effect is cleaned up with a small React component and explicit browser behavior.

React✓ Tested
ReactState & reducers

Initialize state lazily

Initialize state lazily with a small React component and explicit browser behavior.

React✓ Tested
ReactAsync work & status

Inject a data loader into a component

Inject a data loader into a component with a small React component and explicit browser behavior.

React✓ Tested
ReactPerformance & rendering

Keep a callback stable between renders

Keep a callback stable between renders with a small React component and explicit browser behavior.

React✓ Tested
ReactRefs & DOM interaction

Keep a mutable value without rendering on each write

Keep a mutable value without rendering on each write with a small React component and explicit browser behavior.

React✓ Tested
ReactGetting Started

Keep component state with useState

Keep component state with useState with a small React component and explicit browser behavior.

React✓ Tested
ReactForms & validation

Keep numeric input text until conversion

Keep numeric input text until conversion with a small React component and explicit browser behavior.

React✓ Tested
ReactAsync work & status

Keep only the latest requested result

Keep only the latest requested result with a small React component and explicit browser behavior.

React✓ Tested
ReactCustom hooks

Keep separate state for separate hook calls

Keep separate state for separate hook calls with a small React component and explicit browser behavior.

React✓ Tested
C#Collections

Look up a dictionary value

Use TryGetValue for a C# dictionary lookup with a fallback.

C#✓ Tested