FIND YOUR NEXT FEW LINES

Results for “state”

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

453 snippets foundClear filters
ReactContext & shared state

Provide read-only application configuration

Provide read-only application configuration with a small React component and explicit browser behavior.

React✓ Tested
ReactContext & shared state

Read a value from context

Read a value from context with a small React component and explicit browser behavior.

React✓ Tested
jQueryForm serialization & state

Refresh a cached data attribute deliberately

jQuery: After the first read, data caches a parsed value; removeData forces a new attribute read.

jQuery✓ Tested
Arduino / CArrays & embedded state

Reject insertion when a fixed queue is full

Arduino / C: Track a count separately from circular read and write positions.

Arduino / C✓ Tested
ReactState & reducers

Remove an item with filter

Remove an item with filter with a small React component and explicit browser behavior.

React✓ Tested
jQueryForm serialization & state

Remove an optional attribute entirely

jQuery: removeAttr removes the attribute instead of setting a string that might still activate it.

jQuery✓ Tested
AngularSignals & state

Replace a signal’s value explicitly

Replace a signal’s value explicitly with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularSignals & state

Replace an object signal immutably

Replace an object signal immutably with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
jQueryForm serialization & state

Restore a form’s original default values

jQuery: Call the native reset method through the underlying form element.

jQuery✓ Tested
jQueryForm serialization & state

Serialize successful controls for a URL-encoded request

jQuery: serialize includes named enabled controls and checked checkboxes.

jQuery✓ Tested
jQueryForm serialization & state

Set several selected options

jQuery: Passing an array to val selects matching values in a multiple select.

jQuery✓ Tested
Arduino / CArrays & embedded state

Sort a small array in place

Arduino / C: Insertion sort needs no additional array and is suitable for small datasets.

Arduino / C✓ Tested