Skip to content

Instantly share code, notes, and snippets.

@aprabaldi
Created July 27, 2017 12:14
Show Gist options
  • Save aprabaldi/5fd1195053f7d92d595ecac8520f5bc7 to your computer and use it in GitHub Desktop.
Save aprabaldi/5fd1195053f7d92d595ecac8520f5bc7 to your computer and use it in GitHub Desktop.
React Overview
- ES6
-- Arrow Functions:
function(event) { return console.log(event); }.bind(this)
(event) => console.log(event)
(event) => { console.log(event); }
-- Object properties shorthands:
let x = 1; let y = 2;
let obj = {x, y}
-- Template literals:
let multilineString = `This is a
multiline string ${extraText}.`;
-- Destructuring Assignment:
var [a, b] = [1, 2];
a === 1, b === 2
-- Imports and Exports:
import React, {Component} from ‘react’;
React.Component === Component
-- Classes
Export default class HtmlLoader extends React.Component {
constructor(props) {
super(props);
}
}
-- Let, scope
Object.assign()
-- Major changes here: http://es6-features.org/
-React
-- History - Facebook 2011 -> 15.6.1
-- Virtual Dom
-- Loader.js -> React.render()
-- Components
-- HTMLLoader.js
-- JSX (https://facebook.github.io/react/docs/jsx-in-depth.html)
-- Lifecycle Methods and State (https://facebook.github.io/react/docs/react-component.html)
-- Data Flow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment