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: ...

Get Node.js 6.x Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.