Results for “context”
Small, practical examples. Search by task or narrow things down below.
Use a context’s fallback value
Use a context’s fallback value with a small React component and explicit browser behavior.
React✓ Tested
Validate access through a custom context hook
Validate access through a custom context hook with a small React component and explicit browser behavior.
React✓ Tested
Wrap an error with context
Wrap an error with context using a complete Go program with explicit sample inputs.
Go✓ Tested
Capture a command’s success-stream output
PowerShell: Assignment collects output values without requiring text redirection to a file.
PowerShell✓ Tested
Check an external process exit status explicitly
PowerShell: LASTEXITCODE reports a native child exit code independently of ordinary PowerShell cmdlet errors.
PowerShell✓ Tested
Check whether a command can be resolved
PowerShell: Get-Command with a local error override supports an expected missing-command lookup.
PowerShell✓ Tested
Copy a file into an image
Include a small application file during the build.
Dockerfile✓ Tested
Discard incidental output from a setup command
PowerShell: Out-Null prevents setup objects from becoming part of a function or script’s useful result.
PowerShell✓ Tested
Inspect a URI through typed properties
PowerShell: The Uri class separates URL components without manual string splitting.
PowerShell✓ Tested
Memoize an object passed to a provider
Memoize an object passed to a provider with a small React component and explicit browser behavior.
React✓ Tested
Pass an environment value to a child process
PowerShell: The process environment is inherited by a launched child PowerShell process.
PowerShell✓ Tested
Provide read-only application configuration
Provide read-only application configuration with a small React component and explicit browser behavior.
React✓ Tested