Note: it's the number of stars on their various repositories that I've used as the main criteria for selecting these 5 best libraries! The one which “dictated” the here-below hierarchy structure:
But First: A Few Words about React Components
Let me start by attempting to briefly, yet thoroughly, define React components:
Independent, reusable pieces, that you can just mix and match in order to put together the “puzzle” UI for your app: the “composable” user interface!
1. Material UI
A “can't live/develop without” type of library — a set of React components, in fact, that you can use to implement Google's material design.
Therefore, expect it to:
- ease your developer experience as you're building amazing UIs for your apps
- turn into an essential tool to have in your own “SPA building toolkit”
Note: keep in mind to use the same environment for the server and the client whenever you're using Material UI with server rendering.
As for its installing, it's as simple as running this command:
npm install material-ui
2. Ant Design, One of the Most Popular React Libraries
This UI library comes at hand whenever you need to add stunning designs to your React applications.
Following the Ant Design specification, and coming “packed” with a full set of components and demos for you to tap into, this React-based library makes the “Swiss knife” type of tool for designing your desktop applications with.
And speaking of the built-in components that you get right out of the box — aimed at making the developer experience “particularly” enjoyable — let me list them for you here:
- dva front-end development workflow
And it goes without saying that its installation calls for one simple command:
npm install antd
No wonder that it has made it to top 3 most popular React libraries on GitHub:
Take Storybook as the equivalent of Firebase and Meteor, but for front-end developers instead. It eases their work and it significantly improves their development experience.
“How?” By enabling you to build your UI components outside your React application!
And this aspect becomes particularly convenient if you're part of a whole team who's working on the same React project. This way, each of you can work on the UI components in your own projects.
You're not constrained to be designing them in the React app itself since Storybook provides you with its own UI development environment.
Install this React-based library by simply running this npm command:
npm i -g @storybook/cli cd my-react-app getstorybook
Then, feel free to run it using this short command here:
npm run storybook
This static site generator's 2 main features, which “propelled” it straight to the top — that of the most popular React libraries on GitHub?
- it enables you to turn plain text into an awesome website nice and easy, without having to get yourself tangled up in code
- it makes maintaining the website thus generated conveniently easy: you're free to scale it up, later on, to easily enhance its web functionalities
Moreover, installing it calls for just one simple command:
npm install gatsby
Note: Gatsby will also provide you with a command line that you can install running this npm command:
npm install --global gatsby-cli
My list of the most popular React libraries that you, too, should be using, has so far included:
- design-oriented libraries
- libraries geared at making web development a whole lot easier and more accessible
… so how about testing?
How about reviewing a React library that plays the role of a testing utility for React?
And this is but one of Enzyme's key roles; the library's also geared at:
- traversing your component's output
… conveniently easy.
And it manages to streamline all these tasks by imitating jQuery's API for DOM manipulation and transversal (simulate, find and so on).
Also, this lightweight testing library comes up with an option for various types of rendering: static, shallow, mount... Should I also mention that it “gets along” with other libraries — Chai, Mocha, Jasmine, Expect — conveniently well?
Feel free to install it using the following npm command:
npm install enzyme
The END! These are the 5 best open source React libraries that you should be following on GitHub and incorporating into your workflow.
In other words: make your developer experience enjoyable and it will only bubble up to the user experience!