O'Reilly logo

Node.js 6.x Blueprints by Fernando Monteiro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating React components

Similar jQuery widget and AgularJS directives there is React.js, which is  very useful library for creating interface components. However, it is not a complete framework like AngularJS or Ember.js.

The way to think about React.js is by thinking about interface components: everything is a component and a component may be composed of one or more components.

See the following figure:

Creating React components

Screenshot simulating React.js components

Let's create the components one by one for a better understanding:

  1. Inside the client folder, create a new folder called js.
  2. Inside the js folder, create a new file called review.js and add the following content: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required