This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| import React, { Component } from 'react'; | |
| import PropTypes from 'proptypes'; | |
| import ReactDOM from 'react-dom'; | |
| const store = {}; | |
| function getMountNode(uid) { | |
| if (!store[uid]) { | |
| store[uid] = { | |
| mountNode: document.createElement('div'), |
| class Parent extends React.Component { | |
| render() { | |
| return <Child foo={bar => <div>Hello {bar}!</div>} />; | |
| } | |
| } |
| import React, { Component } from 'react'; | |
| import ReactDOM from 'react-dom/lib/ReactDOMFiber'; | |
| import { createCoroutine, createYield } from 'react-dom/lib/ReactCoroutine'; | |
| function Pin(props) { | |
| return createYield( | |
| { height: props.height + 10 }, | |
| () => { | |
| return ( | |
| <div |
| import "babel/polyfill"; | |
| import React from "react"; | |
| import { render } from "react-dom"; | |
| import isMobile from "is-mobile"; | |
| import { Spring, TransitionSpring } from "react-motion"; | |
| const config = [100, 15]; | |
| const spring = (values) => ({val: {...values}, config }); | |
| const getProfileInitialSpring = () => spring({size: 40, left: 25, top: 5}); |
| [alias] | |
| sync = !"sh -c 'git pull upstream ${1-$(git symbolic-ref --short -q HEAD)}; git push' -" |
| var List = Backbone.Marionette.CollectionView.extend({ | |
| itemView: Item, | |
| tagName: 'ul' | |
| }); | |
| var Item = Backbone.Marionette.ItemView.extend({ | |
| tagName: 'li', | |
| template: function(data) { | |
| return '<span rv-text="model.name"></span><p rv-text="model.description"><p>'; | |
| }, |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer