mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-22 17:47:53 +00:00
Update ReactReduxSpa to latest versions of all dependencies, and pin to exact versions
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import { NavMenu } from './NavMenu';
|
||||
|
||||
export interface LayoutProps {
|
||||
children?: React.ReactElement<any>;
|
||||
}
|
||||
|
||||
export class Layout extends React.Component<LayoutProps, {}> {
|
||||
export class Layout extends React.Component<{}, {}> {
|
||||
public render() {
|
||||
return <div className='container-fluid'>
|
||||
<div className='row'>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { createStore, applyMiddleware, compose, combineReducers, GenericStoreEnhancer } from 'redux';
|
||||
import { createStore, applyMiddleware, compose, combineReducers, GenericStoreEnhancer, Store } from 'redux';
|
||||
import thunk from 'redux-thunk';
|
||||
import { routerReducer, routerMiddleware } from 'react-router-redux';
|
||||
import * as Store from './store';
|
||||
import * as StoreModule from './store';
|
||||
import { ApplicationState, reducers } from './store';
|
||||
import { History } from 'history';
|
||||
|
||||
export default function configureStore(history: History, initialState?: Store.ApplicationState) {
|
||||
export default function configureStore(history: History, initialState?: ApplicationState) {
|
||||
// Build middleware. These are functions that can process the actions before they reach the store.
|
||||
const windowIfDefined = typeof window === 'undefined' ? null : window as any;
|
||||
// If devTools is installed, connect to it
|
||||
@@ -15,13 +16,13 @@ export default function configureStore(history: History, initialState?: Store.Ap
|
||||
)(createStore);
|
||||
|
||||
// Combine all reducers and instantiate the app-wide store instance
|
||||
const allReducers = buildRootReducer(Store.reducers);
|
||||
const store = createStoreWithMiddleware(allReducers, initialState) as Redux.Store<Store.ApplicationState>;
|
||||
const allReducers = buildRootReducer(reducers);
|
||||
const store = createStoreWithMiddleware(allReducers, initialState) as Store<ApplicationState>;
|
||||
|
||||
// Enable Webpack hot module replacement for reducers
|
||||
if (module.hot) {
|
||||
module.hot.accept('./store', () => {
|
||||
const nextRootReducer = require<typeof Store>('./store');
|
||||
const nextRootReducer = require<typeof StoreModule>('./store');
|
||||
store.replaceReducer(buildRootReducer(nextRootReducer.reducers));
|
||||
});
|
||||
}
|
||||
@@ -30,5 +31,5 @@ export default function configureStore(history: History, initialState?: Store.Ap
|
||||
}
|
||||
|
||||
function buildRootReducer(allReducers) {
|
||||
return combineReducers<Store.ApplicationState>(Object.assign({}, allReducers, { routing: routerReducer }));
|
||||
return combineReducers<ApplicationState>(Object.assign({}, allReducers, { routing: routerReducer }));
|
||||
}
|
||||
|
||||
@@ -2,42 +2,41 @@
|
||||
"name": "WebApplicationBasic",
|
||||
"version": "0.0.0",
|
||||
"dependencies": {
|
||||
"@types/history": "^4.5.0",
|
||||
"@types/react": "^0.14.29",
|
||||
"@types/react-dom": "^0.14.14",
|
||||
"@types/react-redux": "^4.4.29",
|
||||
"@types/react-router-dom": "^4.0.3",
|
||||
"@types/history": "4.5.1",
|
||||
"@types/react": "15.0.24",
|
||||
"@types/react-dom": "15.5.0",
|
||||
"@types/react-redux": "4.4.40",
|
||||
"@types/react-router-dom": "4.0.4",
|
||||
"@types/react-router-redux": "5.0.1",
|
||||
"@types/redux": "3.5.27",
|
||||
"@types/webpack": "^2.2.0",
|
||||
"@types/webpack-env": "^1.13.0",
|
||||
"aspnet-prerendering": "^2.0.0",
|
||||
"aspnet-webpack": "^1.0.27",
|
||||
"@types/webpack": "2.2.15",
|
||||
"@types/webpack-env": "1.13.0",
|
||||
"aspnet-prerendering": "^2.0.5",
|
||||
"aspnet-webpack": "^1.0.29",
|
||||
"aspnet-webpack-react": "^2.0.0",
|
||||
"awesome-typescript-loader": "^3.0.0",
|
||||
"bootstrap": "^3.3.6",
|
||||
"css-loader": "^0.23.1",
|
||||
"awesome-typescript-loader": "3.1.3",
|
||||
"bootstrap": "3.3.7",
|
||||
"css-loader": "0.28.1",
|
||||
"domain-task": "^3.0.0",
|
||||
"event-source-polyfill": "^0.0.7",
|
||||
"extract-text-webpack-plugin": "^2.0.0-rc",
|
||||
"file-loader": "^0.8.5",
|
||||
"history": "^4.6.1",
|
||||
"jquery": "^2.2.1",
|
||||
"json-loader": "^0.5.4",
|
||||
"node-noop": "^1.0.0",
|
||||
"react": "~15.4.0",
|
||||
"react-dom": "~15.4.0",
|
||||
"event-source-polyfill": "0.0.9",
|
||||
"extract-text-webpack-plugin": "2.1.0",
|
||||
"file-loader": "0.11.1",
|
||||
"history": "4.6.1",
|
||||
"jquery": "3.2.1",
|
||||
"json-loader": "0.5.4",
|
||||
"node-noop": "1.0.0",
|
||||
"react": "15.5.4",
|
||||
"react-dom": "15.5.4",
|
||||
"react-hot-loader": "3.0.0-beta.7",
|
||||
"react-redux": "^4.4.5",
|
||||
"react-router-dom": "^4.1.0",
|
||||
"react-redux": "5.0.4",
|
||||
"react-router-dom": "4.1.1",
|
||||
"react-router-redux": "5.0.0-alpha.6",
|
||||
"redux": "^3.6.0",
|
||||
"redux-thunk": "^2.2.0",
|
||||
"style-loader": "^0.13.0",
|
||||
"typescript": "^2.2.1",
|
||||
"url-loader": "^0.5.7",
|
||||
"webpack": "^2.2.0",
|
||||
"webpack-hot-middleware": "^2.12.2",
|
||||
"webpack-merge": "^0.14.1"
|
||||
"redux": "3.6.0",
|
||||
"redux-thunk": "2.2.0",
|
||||
"style-loader": "0.17.0",
|
||||
"typescript": "2.3.2",
|
||||
"url-loader": "0.5.8",
|
||||
"webpack": "2.5.1",
|
||||
"webpack-hot-middleware": "2.18.0",
|
||||
"webpack-merge": "4.1.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user