FIND YOUR NEXT FEW LINES

Results for “Context & shared state”

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

509 snippets foundClear filters
PowerShellGetting Started

Run a first PowerShell statement

PowerShell: Run a first PowerShell statement using PowerShell 7.

PowerShell✓ Tested
PythonFunctions & error handling

Run cleanup around a custom context

Python: Use try/finally inside a contextmanager so cleanup runs even on failure.

Python✓ Tested
AngularServices & dependency injection

Share signal state through an injected service

Share signal state through an injected service with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
ReactState & reducers

Share state between sibling controls

Share state between sibling controls with a small React component and explicit browser behavior.

React✓ Tested
AngularComponents & communication

Share two-way state through a model input

Share two-way state through a model input with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
CSSInteraction selectors

Show a pressed pointer state

CSS: Active applies during the pointer press rather than after the click has finished.

CSS✓ Tested
AngularGetting Started

Store reactive state in a signal

Store reactive state in a signal with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
ReactGetting Started

Synchronize the document title with state

Synchronize the document title with state with a small React component and explicit browser behavior.

React✓ Tested
AngularGetting Started

Toggle a CSS class from component state

Toggle a CSS class from component state with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
jQueryDOM & classes

Toggle a state class

Toggle a CSS class in a jQuery click handler.

jQuery✓ Tested
Arduino / CDigital signals & interrupts

Toggle an output using an explicit software state

Arduino / C: Keep the intended output state in a Boolean variable.

Arduino / C✓ Tested
ReactState & reducers

Toggle Boolean state

Toggle Boolean state with a small React component and explicit browser behavior.

React✓ Tested