This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; // super class | |
class Book extends React.Component{ // sub class extends super class | |
constructor (){ // all classes have a constructor method | |
super(props); // must do this to link sub class to super class properties | |
this.id = "#B00K123"; | |
this.title = "We All Don't Know JS"; | |
this.description = "The book everyone needs to read"; | |
this.price = 0; |