Skip to content

Instantly share code, notes, and snippets.

View AndrewNduati's full-sized avatar

Andrew Nduati AndrewNduati

View GitHub Profile
@AndrewNduati
AndrewNduati / react_tutorial.txt
Last active July 22, 2019 17:47
Based on the tutorial from OpenClassrooms. We have the Products class which is the parent of ProductForm. How do I pass the product prop on edit?
var PRODUCTS = {
'1': {id: 1, category: "Musical Instrument", price: '$459.99', stocked: true, name: 'Clarinet'},
'2': {id: 2, category: "Musical Instrument", price: '$5,000', stocked: true, name: 'Cello'},
'3': {id: 3, category: 'Musical Instrument', price: '$11,000', stocked: false, name: 'Fortepiano'},
'4': {id: 4, category: 'Furniture', price:'$799', stocked: true, name: 'Chairs lounge'},
'5': {id: 5, category: 'Furniture', price:'$1,300', stocked: false, name: 'Dining table'},
'6': {id: 6, category: 'Furniture', price: '$100', stocked: true, name: 'Bean Bag'}
}
class Products extends React.Component {

Keybase proof

I hereby claim:

  • I am andrewnduati on github.
  • I am nduati (https://keybase.io/nduati) on keybase.
  • I have a public key ASDXjwzIKjaOTqvGjLDnelTrCPEhtpAjSawGok6pkTNINwo

To claim this, I am signing this object: