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

Commit 3162946

Browse files
In ReactReduxSpa, configure store before matching routes. Fixes #663
1 parent c9526dd commit 3162946

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/ReactReduxSpa/ClientApp/boot-server.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import configureStore from './configureStore';
1010
export default createServerRenderer(params => {
1111
return new Promise<RenderResult>((resolve, reject) => {
1212
// Match the incoming request against the list of client-side routes
13+
const store = configureStore();
1314
match({ routes, location: params.location }, (error, redirectLocation, renderProps: any) => {
1415
if (error) {
1516
throw error;
@@ -27,7 +28,6 @@ export default createServerRenderer(params => {
2728
}
2829

2930
// Build an instance of the application
30-
const store = configureStore();
3131
const app = (
3232
<Provider store={ store }>
3333
<RouterContext {...renderProps} />

0 commit comments

Comments
 (0)