Canceling A Promise (codesandbox)
Components often fetch data when they mount, we can cancel async tasks like these as needed with PCancelable
Dynamic HTML Headers (codesandbox)
Dynamically create HTML elements using string concatenation and JSX
Editable State Wrapper (codesandbox)
A render-props based component for providing a toggleable edit state to another component.
Enzyme: Find and Dive (codesandbox)
An example of using Enzyme's shallow rendering and
dive()
with nested components.
Enzyme + Jest Example (codesandbox)
A base example of how to use Enzyme and Jest to test a React component
Log Component (codesandbox)
A component for logging a message or props right in the JSX.
Sign In Form (codesandbox)
A basic Sign In form component demonstrating how such a basic form may be implemented without any form library dependencies.
When Component (github)
A component for conditionally rendering one thing or the other