The snippet library.
Small, practical examples. Search by task or narrow things down below.
Combine independent asynchronous results
Combine independent asynchronous results with a small React component and explicit browser behavior.
React✓ Tested
Disable an action while it is pending
Disable an action while it is pending with a small React component and explicit browser behavior.
React✓ Tested
Display the result of an asynchronous action
Display the result of an asynchronous action with a small React component and explicit browser behavior.
React✓ Tested
Handle an asynchronous failure
Handle an asynchronous failure with a small React component and explicit browser behavior.
React✓ Tested
Ignore a result after its effect is cleaned up
Ignore a result after its effect is cleaned up with a small React component and explicit browser behavior.
React✓ Tested
Inject a data loader into a component
Inject a data loader into a component with a small React component and explicit browser behavior.
React✓ Tested
Keep only the latest requested result
Keep only the latest requested result with a small React component and explicit browser behavior.
React✓ Tested
Offer a retry after a failed attempt
Offer a retry after a failed attempt with a small React component and explicit browser behavior.
React✓ Tested
Report partial success from multiple actions
Report partial success from multiple actions with a small React component and explicit browser behavior.
React✓ Tested