One of the first libraries that were created to solve the problems of inline styles that we encountered in the previous section is Radium. It is maintained by the great developers at Formidable Labs, and it is still one of the most popular solutions.
In this section, we will look at how Radium works, which problems it solves, and why it is a great library to use in conjunction with React for styling components. We are going to create a very simple button, similar to the one we built in the example earlier in this chapter.
We will start with a basic button without styling, and we will add some basic styling, as well as pseudo-classes and media queries, so that we can learn about the main features of the library.
The button we will start with is created as follows:
const Button = () => <button>Click me!</button>
First, we have to install Radium using npm:
npm install --save radium @types/radium
Once the installation is complete, we can import...