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 { |
// Which of these things is the "Higher Order Component?" | |
function withFoo(Component) { // <-- this is a function, not a component | |
class Wrapper extends React.Component { // <-- this is a component | |
static displayName = `withFoo(${Component.displayName || Component.name})` | |
static propTypes = {innerRef: PropTypes.func} | |
static WrappedComponent = Component | |
render() { | |
const {innerRef, ...remainingProps} = this.props | |
return <Component {...remainingProps} foo="FOO!" ref={innerRef} /> |
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