Skip to content

Instantly share code, notes, and snippets.

View mcarslanoglu's full-sized avatar

MEHMET C. ARSLANOGLU mcarslanoglu

View GitHub Profile
@okjodom
okjodom / _bookpropclass.js
Created May 14, 2018 09:34
React JS book prop using ES6 classes
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;