Results for “default”
Small, practical examples. Search by task or narrow things down below.
Report partial success from multiple actions
Report partial success from multiple actions with a small React component and explicit browser behavior.
React✓ Tested
Represent an absent result with optional
C++: value_or supplies a default without requiring a sentinel inside the value domain.
C++✓ Tested
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
Reset child state by changing its key
Reset child state by changing its key with a small React component and explicit browser behavior.
React✓ Tested
Reset controlled form state
Reset controlled form state with a small React component and explicit browser behavior.
React✓ Tested
Reset reducer state explicitly
Reset reducer state explicitly with a small React component and explicit browser behavior.
React✓ Tested
Reset state to a caller-provided initial value
Reset state to a caller-provided initial value 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
Return zero for a sum over no rows
SQL: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.
SQL✓ Tested
Return zero for a sum over no rows
SQL Server: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.
SQL Server✓ Tested
Return zero for a sum over no rows
Postgres: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.
Postgres✓ Tested
Return zero for a sum over no rows
SQLite: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.
SQLite✓ Tested