Updated ReactReduxSpa template to match current patterns

This commit is contained in:
SteveSandersonMS
2016-09-28 17:43:22 +01:00
parent a9ce762827
commit 0a961a7bd0
12 changed files with 95 additions and 57 deletions

View File

@@ -0,0 +1,9 @@
------------------------------------------------------------------
Don't delete this file. Do include it in your source control repo.
------------------------------------------------------------------
This file exists as a workaround for https://github.com/dotnet/cli/issues/1396
('dotnet publish' does not publish any directories that didn't exist or were
empty before the publish script started).
Hopefully, this can be removed after the move to the new MSBuild.

View File

@@ -12,3 +12,9 @@ export default <Route component={ Layout }>
<Route path='(:startDateIndex)' /> { /* Optional route segment that does not affect NavMenu highlighting */ }
</Route>
</Route>;
// Allow Hot Module Reloading
declare var module: any;
if (module.hot) {
module.hot.accept();
}

View File

@@ -33,7 +33,7 @@ export const reducer: Reducer<CounterState> = (state, action) => {
if (isActionType(action, IncrementCount)) {
return { count: state.count + 1 };
}
// For unrecognized actions (or in cases where actions have no effect), must return the existing state
// (or default initial state if none was supplied)
return state || { count: 0 };