Results for “one-off”
Small, practical examples. Search by task or narrow things down below.
Store reactive state in a signal
Store reactive state in a signal with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Store text in a variable
Bash Scripts: Store text in a variable with a small standalone Bash program.
Bash Scripts✓ Tested
Style the first and last list items
Style the first and last list items with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Subscribe to a small external store safely
Subscribe to a small external store safely with a small React component and explicit browser behavior.
React✓ 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
Sum values per category
Calculate a grouped total.
SUM✓ Tested
Supply a default prop value
Supply a default prop value with a small React component and explicit browser behavior.
React✓ Tested
Synchronize a document property with an effect
Synchronize a document property with an effect with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Synchronize the document title with state
Synchronize the document title with state with a small React component and explicit browser behavior.
React✓ Tested
Test a function’s success status
Bash Scripts: Test a function’s success status with a small standalone Bash program.
Bash Scripts✓ Tested
Test whether an unsigned value is a power of two
C: A nonzero power of two has exactly one set bit.
C✓ Tested
Test whether tracked working files changed
Git: A quiet diff returns status one for differences, so handle it in a conditional.
Git✓ Tested