React Snippets

The React snippet collection contains function components and reusable hooks for React 16.

  • Take a deeper dive into React's rendering process and understand the basics behind the popular JavaScript framework.

  • React rendering state

    React, Article

    Take a deeper dive into React's rendering process and understand the role of the Context API and Redux in it.

  • Testing React components that update asynchronously with React Testing Library is a common scenario. Learn how to deal with common issues and speed up your testing.

  • Take a deeper dive into React's rendering process and understand how to make small yet powerful tweaks to optimize performance.

  • TagInput

    React, Components

    Renders a tag input field.

  • Testing Redux-connected components with React Testing Library is a very common scenario. Learn how to use this simple utility function to speed up your testing.

  • MultiselectCheckbox

    React, Components

    Renders a checkbox list that uses a callback function to pass its selected value/values to the parent component.

  • Testing stateful React components is by no means a difficult task, but did you know there is an elegant solution that doesn't involve testing state directly?

  • LimitedWordTextarea

    React, Components

    Renders a textarea component with a word limit.

  • Modal

    React, Components

    Renders a Modal component, controllable through events.

  • Tabs

    React, Components

    Renders a tabbed menu and view component.

  • As powerful as React is, it is also quite fragile at places. Did you know that just a few lines are more than enough to break your entire React application?

  • Accordion

    React, Components

    Renders an accordion menu with multiple collapsible content elements.

  • TreeView

    React, Components

    Renders a tree view of a JSON object or array with collapsible content.

  • RippleButton

    React, Components

    Renders a button that animates a ripple effect when clicked.

2...4