My go-to React libraries for 2021

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • redux-thunk

    Thunk middleware for Redux

  • I’ve used Redux for many projects, it is (was ?) a great solution to centralize the data of your application. But some things just felt over-complicated and developers have been complaining about this for a long time. For example, learning the Flux pattern can be quite difficult for some people. Then someone tells you that you need to use a middleware to handle your side effects. Great ! Let’s use Redux Thunk. But wait, now someone tells you that there is a better solution : Redux Saga. Nice ! Even more complexity to handle.

  • jotai

    👻 Primitive and flexible state management for React

  • But 2020 changed that and new challengers appeared. You might have heard of Recoil, Jotai, Zustand or just React Context API. But the one that made me drop Redux is :

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • reactstrap

    Simple React Bootstrap 5 components

  • I’ve started React with Reactstrap (Bootstrap for React) and then switched to Material UI. I dropped Reactstrap because Bootstrap was not the cool thing anymore and Material was. But all I felt using Material UI was frustration. To me the components are not always intuitive or flexible enough and I lost too much time searching simple things in the documentation. Material UI was not the right choice for me. So I searched for an alternative and found :

  • zustand

    🐻 Bear necessities for state management in React

  • Zustand is a small and fast state-management solution. I’m not a big fan of context-based libraries like Redux. It always felt like dark magic to me : you don’t really know how it works, but it does the trick 🤷‍♂️. I’m not saying that context-based state management is bad, I’m just saying that the whole Provider/Consumer thing doesn’t feel natural to me even if it’s a React feature.

  • formsy-react

    A form input builder and validator for React JS (by formsy)

  • In the past few years, we’ve seen many libraries trying to provide an easy way to handle forms. You may have heard of Redux Form (please, no), Formsy or Formik. I’ve tried them all but the one that convinced me was :

  • react-query

    Discontinued 🤖 Powerful asynchronous state management, server-state utilities and data fetching for TS/JS, React, Solid, Svelte and Vue. [Moved to: https://github.com/TanStack/query]

  • For those who already know it, you might say that it’s not like Redux. It doesn’t do the same thing. React Query is a data fetching library, it makes fetching, caching, synchronizing and updating server state easy.

  • react-hook-form

    📋 React Hooks for form state management and validation (Web + React Native)

  • React Hook Form is a very simple, hook based library with easy data validation. According to their benchmark it is much faster than other alternatives. By using hooks, React Hook Form feels very natural, it also uses refs (i.e. uncontrolled inputs) to get value from your fields so it’s basically standard javascript. Formik is another great alternative but feels more complicated to me.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • Material UI

    Ready-to-use foundational React components, free forever. It includes Material UI, which implements Google's Material Design.

  • I’ve started React with Reactstrap (Bootstrap for React) and then switched to Material UI. I dropped Reactstrap because Bootstrap was not the cool thing anymore and Material was. But all I felt using Material UI was frustration. To me the components are not always intuitive or flexible enough and I lost too much time searching simple things in the documentation. Material UI was not the right choice for me. So I searched for an alternative and found :

  • formik

    Discontinued Build forms in React, without the tears 😭 [Moved to: https://github.com/jaredpalmer/formik]

  • In the past few years, we’ve seen many libraries trying to provide an easy way to handle forms. You may have heard of Redux Form (please, no), Formsy or Formik. I’ve tried them all but the one that convinced me was :

  • Enzyme

    JavaScript Testing utilities for React

  • I was introduced to testing React applications with Enzyme. Back in the day it was probably the best solution. But time has passed and a very strong alternative has appeared :

  • antd

    An enterprise-class UI design language and React UI library

  • Ant Design is a design system for enterprise-level products. It comes with all the components you need. Every time I wonder “Can I do this with component ?” I can do it. The documentation is very good and contains a lot of examples. You can feel by reading it that peoples have thought a long time about what features could be useful.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts