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 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
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; | |
} |
NewerOlder