Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit 33b275a

Browse files
Update ReactReduxSpa to latest versions of all dependencies, and pin to exact versions
1 parent c9d235d commit 33b275a

File tree

3 files changed

+40
-44
lines changed

3 files changed

+40
-44
lines changed

templates/ReactReduxSpa/ClientApp/components/Layout.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import * as React from 'react';
22
import { NavMenu } from './NavMenu';
33

4-
export interface LayoutProps {
5-
children?: React.ReactElement<any>;
6-
}
7-
8-
export class Layout extends React.Component<LayoutProps, {}> {
4+
export class Layout extends React.Component<{}, {}> {
95
public render() {
106
return <div className='container-fluid'>
117
<div className='row'>
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import { createStore, applyMiddleware, compose, combineReducers, GenericStoreEnhancer } from 'redux';
1+
import { createStore, applyMiddleware, compose, combineReducers, GenericStoreEnhancer, Store } from 'redux';
22
import thunk from 'redux-thunk';
33
import { routerReducer, routerMiddleware } from 'react-router-redux';
4-
import * as Store from './store';
4+
import * as StoreModule from './store';
5+
import { ApplicationState, reducers } from './store';
56
import { History } from 'history';
67

7-
export default function configureStore(history: History, initialState?: Store.ApplicationState) {
8+
export default function configureStore(history: History, initialState?: ApplicationState) {
89
// Build middleware. These are functions that can process the actions before they reach the store.
910
const windowIfDefined = typeof window === 'undefined' ? null : window as any;
1011
// If devTools is installed, connect to it
@@ -15,13 +16,13 @@ export default function configureStore(history: History, initialState?: Store.Ap
1516
)(createStore);
1617

1718
// Combine all reducers and instantiate the app-wide store instance
18-
const allReducers = buildRootReducer(Store.reducers);
19-
const store = createStoreWithMiddleware(allReducers, initialState) as Redux.Store<Store.ApplicationState>;
19+
const allReducers = buildRootReducer(reducers);
20+
const store = createStoreWithMiddleware(allReducers, initialState) as Store<ApplicationState>;
2021

2122
// Enable Webpack hot module replacement for reducers
2223
if (module.hot) {
2324
module.hot.accept('./store', () => {
24-
const nextRootReducer = require<typeof Store>('./store');
25+
const nextRootReducer = require<typeof StoreModule>('./store');
2526
store.replaceReducer(buildRootReducer(nextRootReducer.reducers));
2627
});
2728
}
@@ -30,5 +31,5 @@ export default function configureStore(history: History, initialState?: Store.Ap
3031
}
3132

3233
function buildRootReducer(allReducers) {
33-
return combineReducers<Store.ApplicationState>(Object.assign({}, allReducers, { routing: routerReducer }));
34+
return combineReducers<ApplicationState>(Object.assign({}, allReducers, { routing: routerReducer }));
3435
}

templates/ReactReduxSpa/package.json

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,41 @@
22
"name": "WebApplicationBasic",
33
"version": "0.0.0",
44
"dependencies": {
5-
"@types/history": "^4.5.0",
6-
"@types/react": "^0.14.29",
7-
"@types/react-dom": "^0.14.14",
8-
"@types/react-redux": "^4.4.29",
9-
"@types/react-router-dom": "^4.0.3",
5+
"@types/history": "4.5.1",
6+
"@types/react": "15.0.24",
7+
"@types/react-dom": "15.5.0",
8+
"@types/react-redux": "4.4.40",
9+
"@types/react-router-dom": "4.0.4",
1010
"@types/react-router-redux": "5.0.1",
11-
"@types/redux": "3.5.27",
12-
"@types/webpack": "^2.2.0",
13-
"@types/webpack-env": "^1.13.0",
14-
"aspnet-prerendering": "^2.0.0",
15-
"aspnet-webpack": "^1.0.27",
11+
"@types/webpack": "2.2.15",
12+
"@types/webpack-env": "1.13.0",
13+
"aspnet-prerendering": "^2.0.5",
14+
"aspnet-webpack": "^1.0.29",
1615
"aspnet-webpack-react": "^2.0.0",
17-
"awesome-typescript-loader": "^3.0.0",
18-
"bootstrap": "^3.3.6",
19-
"css-loader": "^0.23.1",
16+
"awesome-typescript-loader": "3.1.3",
17+
"bootstrap": "3.3.7",
18+
"css-loader": "0.28.1",
2019
"domain-task": "^3.0.0",
21-
"event-source-polyfill": "^0.0.7",
22-
"extract-text-webpack-plugin": "^2.0.0-rc",
23-
"file-loader": "^0.8.5",
24-
"history": "^4.6.1",
25-
"jquery": "^2.2.1",
26-
"json-loader": "^0.5.4",
27-
"node-noop": "^1.0.0",
28-
"react": "~15.4.0",
29-
"react-dom": "~15.4.0",
20+
"event-source-polyfill": "0.0.9",
21+
"extract-text-webpack-plugin": "2.1.0",
22+
"file-loader": "0.11.1",
23+
"history": "4.6.1",
24+
"jquery": "3.2.1",
25+
"json-loader": "0.5.4",
26+
"node-noop": "1.0.0",
27+
"react": "15.5.4",
28+
"react-dom": "15.5.4",
3029
"react-hot-loader": "3.0.0-beta.7",
31-
"react-redux": "^4.4.5",
32-
"react-router-dom": "^4.1.0",
30+
"react-redux": "5.0.4",
31+
"react-router-dom": "4.1.1",
3332
"react-router-redux": "5.0.0-alpha.6",
34-
"redux": "^3.6.0",
35-
"redux-thunk": "^2.2.0",
36-
"style-loader": "^0.13.0",
37-
"typescript": "^2.2.1",
38-
"url-loader": "^0.5.7",
39-
"webpack": "^2.2.0",
40-
"webpack-hot-middleware": "^2.12.2",
41-
"webpack-merge": "^0.14.1"
33+
"redux": "3.6.0",
34+
"redux-thunk": "2.2.0",
35+
"style-loader": "0.17.0",
36+
"typescript": "2.3.2",
37+
"url-loader": "0.5.8",
38+
"webpack": "2.5.1",
39+
"webpack-hot-middleware": "2.18.0",
40+
"webpack-merge": "4.1.0"
4241
}
4342
}

0 commit comments

Comments
 (0)