Results for “Container lifecycle”
Small, practical examples. Search by task or narrow things down below.
Rerun an effect when its dependency changes
Rerun an effect when its dependency changes with a small React component and explicit browser behavior.
React✓ Tested
Restore the previous document title
Restore the previous document title with a small React component and explicit browser behavior.
React✓ Tested
Schedule a one-time update with cleanup
Schedule a one-time update with cleanup with a small React component and explicit browser behavior.
React✓ Tested
Skip synchronization when a feature is disabled
Skip synchronization when a feature is disabled with a small React component and explicit browser behavior.
React✓ Tested
Store and inspect a fixed set of bits
C++: bitset offers named operations and a readable binary representation.
C++✓ Tested
Subscribe to and clean up a window event
Subscribe to and clean up a window event with a small React component and explicit browser behavior.
React✓ Tested
Tie a subscription’s lifetime to its component
Tie a subscription’s lifetime to its component with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Transform an observable value
Transform an observable value with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Unpack a tuple with structured bindings
C++: Structured bindings give names to the parts of a returned compound value.
C++✓ Tested
Update repeatedly with a cleaned-up interval
Update repeatedly with a cleaned-up interval with a small React component and explicit browser behavior.
React✓ Tested
Use a hash map for direct key lookup
C++: unordered_map provides key lookup without promising iteration order.
C++✓ Tested
Use a last-in first-out stack
C++: Read top before pop because pop does not return the removed value.
C++✓ Tested