Feel free to run via...
npx https://gist.github.com/elijahmanor/4cc8e3eac9fb5999c5d759388ff27c64
# xcode noise | |
build/* | |
*.perspective | |
*.perspectivev3 | |
*.pbxuser | |
*.xcworkspace | |
*.mode1 | |
*.mode2v3 | |
*.mode1v3 | |
xcuserdata |
alias l="ls -al" | |
alias c="cd" | |
alias b="cd .." | |
alias bb="cd ../.." | |
# application aliases | |
alias v="vim" | |
alias vi="vim" |
var expect = chai.expect; | |
describe('services', function(){ | |
var goat, monkey, monkey2, Donkey, tiger1, tiger2, lion; | |
beforeEach(function(){ | |
//load the module | |
module('app'); | |
//configure providers |
// In v2/3 you did this: | |
import ReactDOM from 'react-dom' | |
import { Router, browserHistory, Route } from 'react-router' | |
ReactDOM.render( | |
<Router> | |
<Route path="/about" component={About}/> | |
<Route path="/:username" component={User}/> | |
</Router> | |
) |
// ugly way | |
var obj = { | |
a: 1, | |
b: 2, | |
c: 3, | |
[Symbol.iterator]() { | |
var keys = Object.keys(this); | |
var idx = 0; | |
return { |
exports.config = { | |
// The address of a running selenium server. | |
seleniumAddress: 'http://localhost:4444/wd/hub', | |
// Capabilities to be passed to the webdriver instance. | |
capabilities: { | |
// 'browserName': 'internet explorer', - special installation needed | |
// 'version':'10', | |
'browserName': 'chrome', | |
//'browserName': 'firefox' |
Feel free to run via...
npx https://gist.github.com/elijahmanor/4cc8e3eac9fb5999c5d759388ff27c64
No, this isn't about render props
I'm going to clean this up and publish it in my newsletter next week!
So react-i18n
(not the npm one... one we made at PayPal internally) has this
// control props | |
import React from 'react' | |
import _ from 'lodash' | |
import {Switch} from '../switch' | |
const callAll = (...fns) => (...args) => fns.forEach(fn => fn && fn(...args)) | |
const noop = () => {} | |
function toggleReducer(state, {type, initialState}) { |