-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [WIP] Route-based code splitting (#884) * Upgrading to React Router v4, using react-router-redux@next Refactoring routes.js to use Switch store now export history renamed router reducer switch to react-router-dom * Adding code-splitting at route level * Fix flow warnings * Fix Typo during eslint no-shadow fix * More flow fixes... * Even more Flow checking * Switching to babel preset dynamic import webpack * Fixing CounterPage spec * Route-based code splitting * Updated all deps * Updated flow types * Fix npm start and npm run dev (#901) * should fix npm start and npm run dev * change back to warn about the global requires * makes flow happy * flow again use Children, passes npm run lint locally * flow again use any so we only get a warning * flow disable children * Updated deps * Cleaned up code style, removed unnecessary eslint supressions * Removed flow children disabled line * Added HtmlWebpackPlugin (#916) * Fixed HMR (disabled multiStep) (#920) * Fixed HMR * Commented multiPass instead of removing * Updated CHANGELOG (#923) * Updated changelog * Added more notable changes [ci skip] * Added support for Webpack Bundle Analyzer (#922) * Added webpack bundle analyzer to CHANGELOG [ci skip] * Bump package.json version [ci skip] * Bump flow-bin [ci skip] * Fixed hot-reload refresh url * Bumped electron * Added Initial Jest Snapshot Testing Support (#928) * Updated CHANGELOG date [ci skip] s
- Loading branch information
Showing
25 changed files
with
339 additions
and
179 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ app/dist/ | |
app/main.js | ||
node_modules | ||
dll | ||
__snapshots__ |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,3 +50,4 @@ main.js.map | |
|
||
.idea | ||
npm-debug.log.* | ||
__snapshots__ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
".git": true, | ||
"node_modules": true, | ||
"flow-typed": true, | ||
"__snapshots__": true, | ||
"bower_components": true | ||
} | ||
} |
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
// @flow | ||
import { combineReducers } from 'redux'; | ||
import { routerReducer as routing } from 'react-router-redux'; | ||
import { routerReducer as router } from 'react-router-redux'; | ||
import counter from './counter'; | ||
|
||
const rootReducer = combineReducers({ | ||
counter, | ||
routing | ||
router, | ||
}); | ||
|
||
export default rootReducer; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
// @flow | ||
/* eslint flowtype-errors/show-errors: 0 */ | ||
import React from 'react'; | ||
import { Route, IndexRoute } from 'react-router'; | ||
import { BrowserRouter as Router } from 'react-router-dom'; | ||
import { Switch, Route } from 'react-router'; | ||
import App from './containers/App'; | ||
import HomePage from './containers/HomePage'; | ||
import CounterPage from './containers/CounterPage'; | ||
|
||
|
||
export default ( | ||
<Route path="/" component={App}> | ||
<IndexRoute component={HomePage} /> | ||
<Route path="/counter" component={CounterPage} /> | ||
</Route> | ||
export default () => ( | ||
<Router> | ||
<App> | ||
<Switch> | ||
<Route path="/counter" component={CounterPage} /> | ||
<Route path="/" component={HomePage} /> | ||
</Switch> | ||
</App> | ||
</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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
// @flow | ||
import { createStore, applyMiddleware } from 'redux'; | ||
import thunk from 'redux-thunk'; | ||
import { hashHistory } from 'react-router'; | ||
import { createBrowserHistory } from 'history'; | ||
import { routerMiddleware } from 'react-router-redux'; | ||
import rootReducer from '../reducers'; | ||
import type { counterStateType } from '../reducers/counter'; | ||
|
||
const router = routerMiddleware(hashHistory); | ||
|
||
const history = createBrowserHistory(); | ||
const router = routerMiddleware(history); | ||
const enhancer = applyMiddleware(thunk, router); | ||
|
||
export default function configureStore(initialState?: counterStateType) { | ||
function configureStore(initialState?: counterStateType) { | ||
return createStore(rootReducer, initialState, enhancer); | ||
} | ||
|
||
export default { configureStore, history }; |
Oops, something went wrong.