Results for “state”
Small, practical examples. Search by task or narrow things down below.
Provide read-only application configuration
Provide read-only application configuration with a small React component and explicit browser behavior.
React✓ Tested
Read a value from context
Read a value from context with a small React component and explicit browser behavior.
React✓ Tested
Refresh a cached data attribute deliberately
jQuery: After the first read, data caches a parsed value; removeData forces a new attribute read.
jQuery✓ Tested
Reject insertion when a fixed queue is full
Arduino / C: Track a count separately from circular read and write positions.
Arduino / C✓ Tested
Remove an item with filter
Remove an item with filter with a small React component and explicit browser behavior.
React✓ Tested
Remove an optional attribute entirely
jQuery: removeAttr removes the attribute instead of setting a string that might still activate it.
jQuery✓ Tested
Replace a signal’s value explicitly
Replace a signal’s value explicitly with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Replace an object signal immutably
Replace an object signal immutably with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Restore a form’s original default values
jQuery: Call the native reset method through the underlying form element.
jQuery✓ Tested
Serialize successful controls for a URL-encoded request
jQuery: serialize includes named enabled controls and checked checkboxes.
jQuery✓ Tested
Set several selected options
jQuery: Passing an array to val selects matching values in a multiple select.
jQuery✓ Tested
Sort a small array in place
Arduino / C: Insertion sort needs no additional array and is suitable for small datasets.
Arduino / C✓ Tested