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
// change this file | |
module.exports = 42 |
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
import { combineReducers } from 'redux'; | |
import users from './reducers/users'; | |
import posts from './reducers/posts'; | |
export default function createReducer(asyncReducers) { | |
return combineReducers({ | |
users, | |
posts, | |
...asyncReducers | |
}); |
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
// Written by @iclanzan | |
// All credit goes to him! | |
// You create the reducer like this: | |
// var reducer = createTimelineReducer('someName', someReducer, ['foo', 'bar']); | |
// And then whenever an action of type `foo` or `bar` happens it calls `someReducer` and adds the result to the timeline. | |
// Then to undo/redo you trigger an action of type `someNameUndo`/`someNameRedo`. | |
var defaults = require('lodash/object/defaults'); | |
var capitalize = require('lodash/string/capitalize'); |
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
import React, { Component } from 'react'; | |
import { createStore, combineReducers, applyMiddleware, bindActionCreators } from 'redux'; | |
import { provide, connect } from 'react-redux'; | |
import thunk from 'redux-thunk'; | |
const AVAILABLE_SUBREDDITS = ['apple', 'pics']; | |
// ------------ | |
// reducers | |
// ------------ |
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
// App.js | |
import { Provider, Connector } from 'redux/react'; | |
import monitor from './monitor/index'; | |
const store = composeStores(stores); | |
const { dispatcher, ActionLog } = monitor(createDispatcher(store)); | |
const redux = createRedux(dispatcher); | |
export default class App { |