FIND YOUR NEXT FEW LINES

Results for “Signals & state”

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

462 snippets foundClear filters
ReactGetting Started

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
jQueryCollections & styling

Apply classes from explicit Boolean state

jQuery: The second toggleClass argument applies a known state consistently.

jQuery✓ Tested
Arduino / CBinary values & packets

Assign a bit from a Boolean state

Arduino / C: bitWrite accepts a bit position and a zero or nonzero value.

Arduino / C✓ Tested
ReactState & reducers

Calculate derived state during rendering

Calculate derived state during rendering with a small React component and explicit browser behavior.

React✓ Tested
GoFunctions & types

Capture state in a closure

Capture state in a closure using a complete Go program with explicit sample inputs.

Go✓ Tested
ReactState & reducers

Centralize state changes in a reducer

Centralize state changes in a reducer with a small React component and explicit browser behavior.

React✓ Tested
jQueryForm serialization & state

Distinguish current state from initial markup

jQuery: prop reads the live checked state; attr reads the original checked attribute.

jQuery✓ Tested
HTMLAccessible structure

Expose a disclosure button’s expanded state

HTML: Keep aria-expanded synchronized with the controlled panel’s hidden state.

HTML✓ Tested
ReactAccessibility & events

Expose a disclosure’s expanded state

Expose a disclosure’s expanded state with a small React component and explicit browser behavior.

React✓ Tested
AngularAccessibility & reusable patterns

Expose a disclosure’s expanded state

Expose a disclosure’s expanded state with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularServices & dependency injection

Expose service state through a read-only signal

Expose service state through a read-only signal with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
Docker / ComposeContainer lifecycle

Find a named container in the created state

Docker / Compose: Combine name and status filters to narrow a listing.

Docker / Compose✓ Tested