SSR Considerations:
ES Modules Non-js files babel/webpack compile server code Gate browser-specific APIs
React componentDidMount Ensure responsiveness through CSS only
const INITIAL_COMMAND = `5 5 | |
1 2 N | |
LMLMLMLMM` | |
const cardinals = ['N', 'E', 'S', 'W'] | |
const directions = {L: -1, R: 1} | |
const traverseRing = (ring, i) => | |
ring[(i % ring.length + ring.length) % ring.length] | |
const marshal = input => { |
// Node | |
https://nodejs.org/en/download/current/ | |
// Create React App | |
https://github.com/facebookincubator/create-react-app |
SSR Considerations:
ES Modules Non-js files babel/webpack compile server code Gate browser-specific APIs
React componentDidMount Ensure responsiveness through CSS only
class AsyncButton extends Component { | |
render() { | |
const { | |
loading, | |
action, | |
label, | |
children | |
} = this.props | |
return ( |
'use strict' | |
let exists = scope => typeof scope !== 'undefined' ? scope : null | |
let bind = (e, fn, scope) => { | |
scope.addEventListener && scope.addEventListener(e, fn) | |
scope.attachEvent && scope.attachEvent(`on${e}`, () => fn.call(scope)) | |
} | |
let unbind = (e, fn, scope) => { |
List of possible relationships | |
everyone | |
grandfather | |
grandmother | |
father | |
mother | |
child | |
sibling | |
cousin |
let options = { something: value, somethingElse: anotherVal } | |
// interface 1: instantiate with an options object | |
let lib = require('lib')(options) | |
// interface 2: exposes an init method, into which you pass options | |
let lib = require('lib') | |
lib.init(options) | |
// interface 3: assign options directly on the library |
[credential] | |
helper = osxkeychain | |
[alias] | |
co = checkout | |
st = status | |
di = diff | |
dc = diff --cached | |
pull = pull --ff-only | |
lg = log --pretty=format:'%C(bold)-%Creset %C(red bold)%h%d%Creset | %C(green)%an%Creset | %C(magenta)%cr%Creset | %C(cyan)%s%Creset' | |
[push] |