This file contains 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
export default class ReducerChain { | |
constructor(reducers) { | |
this.reducers = reducers; | |
if (!Array.isArray(reducers)) { | |
throw new Error('To create a reducer chain you must pass in an array of functions.'); | |
} | |
return this.reducer; | |
} |
This file contains 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
import axios from 'axios'; | |
class FetchActionCreators { | |
constructor(endpoint, actions) { | |
const [REQUEST, SUCCESS, FAILURE] = actions; | |
this.actions = { | |
REQUEST, | |
SUCCESS, | |
FAILURE, |
This file contains 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
import React, { PropTypes } from 'react'; | |
import { connect } from 'react-redux'; | |
import { initializeSocket } from './redux/socket.js'; | |
class App extends React.Component { | |
static propTypes = { | |
dispatch: PropTypes.func.isRequired, | |
socket: PropTypes.object.isRequired, | |
}; | |
This file contains 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
import React from 'react'; | |
import { defineMessages } from 'react-intl'; | |
import FormattedAnchor from './FormattedAnchor'; | |
const messages = defineMessages({ | |
menuItem: { | |
id: 'menu.item', | |
defaultMessage: 'Menu Item', | |
}, | |
menuItem1: { |
This file contains 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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import Hydrator from './Hydrator'; | |
import DataComponent from './DataComponent'; | |
const App = () => <Hydrator><DataComponent /></Hydrator>; | |
ReactDOM.render(<App />, 'app'); |
This file contains 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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import ReactFlux from 'react-flux'; | |
import './index.css'; | |
import AppForm from './react-components/AppForm'; | |
import registerServiceWorker from './registerServiceWorker'; | |
import axios from 'axios'; | |
function getApplications() { |
This file contains 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
import React, { Component } from 'react'; | |
import Paper from 'material-ui/Paper'; | |
const panelStyle = { | |
width: '400px', | |
marginLeft: '42%', | |
marginRight: '50%', | |
} | |
class PaperPanel extends Component { |
This file contains 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
import * as Rx from 'rxjs'; | |
import queryString from 'query-string'; | |
/** | |
* This function simply transforms any actions into an array of actions | |
* This enables us to use the synthax Observable.of(...actions) | |
* If an array is passed to this function it will be returned automatically instead | |
* Example: mapObservables({ type: ACTION_1 }) -> will return: [{ type: ACTION_1 }] | |
* Example2: mapObservables([{ type: ACTION_1 }, { type: ACTION_2 }]) -> will return: [{ type: ACTION_1 }, { type: ACTION_2 }] | |
*/ |
This file contains 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
<?php | |
use FastRoute\Dispatcher; | |
use FastRoute\RouteParser; | |
use FastRoute\RouteParser\Std as StdParser; | |
use FastRoute\RouteCollector; | |
use FastRoute\DataGenerator\GroupCountBased as GroupCountBasedDataGenerator; | |
use Psr\Http\Message\RequestInterface; | |
use Slim\Route; | |
use Slim\Router; |
This file contains 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
import { createLocation } from 'history/LocationUtils'; | |
import { addLeadingSlash, stripTrailingSlash, stripBasename, createPath } from 'history/PathUtils'; | |
import { getConfirmation, supportsHistory, supportsPopStateOnHashChange, isExtraneousPopstateEvent } from 'history/DOMUtils'; | |
import createTransitionManager from './createTransitionManager'; | |
const PopStateEvent = 'popstate'; | |
const HashChangeEvent = 'hashchange'; | |
const getHistoryState = () => { | |
try { |
OlderNewer