Creating the Orders component

Add the final Orders.js component by going through the following steps. Try to do it yourself before seeing the solution so that you practice your skills with some stylus CSS to complete the design. You'll find that it takes more time than expected, but it's well worth the effort:

  1. Import the required libraries, as shown in the following code:
import React, { Component } from 'react'import Header from './Header'
  1. Define the constructor with some invented orders so that you can see how it will look, as shown in the following code:
class Orders extends Component {    constructor() {        super()        // We'll separate the completed vs the pending based on the order state        this.state = {            sellOrders: [{                id: 1, title: 'Classic ...

Get Mastering Ethereum 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.