Reader small image

You're reading from  React Components

Product typeBook
Published inApr 2016
Publisher
ISBN-139781785889288
Edition1st Edition
Tools
Right arrow
Author (1)
Christopher Pitt
Christopher Pitt
author image
Christopher Pitt

Christopher Pitt is a principal developer for SilverStripe in Wellington, New Zealand. He usually works on open source software, though sometimes you'll find him building compilers and robots.
Read more about Christopher Pitt

Right arrow

Alternatives


There are a few other ways in which we can style and animate React components, and they all deal with the issue in subtly different ways.

CSS modules

CSS modules allow you to define styles that only apply in a local context to individual elements. They look like regular CSS styles, but when they're applied to components, they are altered so that the class names given to components are unique. You can read more about CSS modules at http://glenmaddern.com/articles/css-modules.

React style

React style is a way of creating inline styles as slightly enhanced objects. It lacks support for a few common CSS selectors, but does a good job otherwise. You can read more about it at https://github.com/js-next/react-style.

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
React Components
Published in: Apr 2016Publisher: ISBN-13: 9781785889288

Author (1)

author image
Christopher Pitt

Christopher Pitt is a principal developer for SilverStripe in Wellington, New Zealand. He usually works on open source software, though sometimes you'll find him building compilers and robots.
Read more about Christopher Pitt