This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let BlogPostPage = React.createClass({ | |
render() { | |
<div> | |
<SiteNavigation /> | |
<MainContentArea> | |
{connectToStores({ | |
posts: store => ({ | |
post: store.getPost(this.props.postId), | |
nextPost: store.getPostAfter(this.props.postId) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var { union, find, without, clone } = require('underscore'), | |
invariant = require('react/lib/invariant'); | |
class PaginatedList { | |
constructor(ids) { | |
this._ids = ids || []; | |
this._pageCount = 0; | |
this._nextPageUrl = null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var React = require('react'), | |
PureRenderMixin = require('../mixins/PureRenderMixin'), | |
getSupportedTransformProperty = require('../utils/getSupportedTransformProperty'), | |
{ PropTypes, Children } = React; | |
const transformProperty = getSupportedTransformProperty(); | |
const styles = { | |
root: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var TRANSFORM_VARIANTS = { | |
'WebkitTransform': '-webkit-transform', | |
'Transform': 'transform' | |
}; | |
function test() { | |
var testEl = document.createElement('div'), | |
style = testEl.style; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var ScreenSizeStore = require('../stores/ScreenSizeStore'); | |
var ScreenSizeMixin = { | |
getInitialState() { | |
return this.getScreenSizeState(); | |
}, | |
getScreenSize() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var AppDispatcher = require('../dispatcher/AppDispatcher'), | |
ActionTypes = require('../constants/ActionTypes'), | |
ScreenSizes = require('../constants/ScreenSizes'), | |
{ createStore } = require('../utils/StoreUtils'); | |
function getScreenSize() { | |
if (window.matchMedia('(min-width: 100em)').matches) { | |
return ScreenSizes.EXTRA_LARGE; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/** | |
* Adapted from https://github.com/Khan/react-components/blob/master/js/timeout-transition-group.jsx | |
* with the following additions: | |
* | |
* - Use BEM-ish modifiers (--enter, --enter--active, --leave, --leave--active) | |
* - Work better with rAF batching strategy (see https://github.com/facebook/react/issues/2292) | |
* | |
* The CSSTransitionGroup component uses the 'transitionend' event, which |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server = new WebpackDevServer(webpack(config), { | |
contentBase: contentBase, | |
publicPath: config.output.publicPath, | |
hot: true | |
}); | |
server.listen(port, '0.0.0.0'); | |
server.app.use(function pushStateHook(req, res, next) { | |
var ext = path.extname(req.url); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var express = require('express'), | |
app = express(); | |
require('./config/development')(app, express); | |
require('./config/production')(app, express); | |
var redis = require('redis'), | |
request = require('request'), |