Title: redux store created AFTER router match while doing server-side rendering in ReactReduxSpa · Issue #663 · aspnet/JavaScriptServices · GitHub
Open Graph Title: redux store created AFTER router match while doing server-side rendering in ReactReduxSpa · Issue #663 · aspnet/JavaScriptServices
X Title: redux store created AFTER router match while doing server-side rendering in ReactReduxSpa · Issue #663 · aspnet/JavaScriptServices
Description: I'm using onEnter in some Route elements that require authentication. On client-side things just worked; when rendered on server I got exceptions. As it turned out I was trying to access login-related info in the redux store in the funct...
Open Graph Description: I'm using onEnter in some Route elements that require authentication. On client-side things just worked; when rendered on server I got exceptions. As it turned out I was trying to access login-rela...
X Description: I'm using onEnter in some Route elements that require authentication. On client-side things just worked; when rendered on server I got exceptions. As it turned out I was trying to access login-...
Opengraph URL: https://github.com/aspnet/JavaScriptServices/issues/663
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"redux store created AFTER router match while doing server-side rendering in ReactReduxSpa","articleBody":"I'm using `onEnter` in some Route elements that require authentication. On client-side things just worked; when rendered on server I got exceptions. As it turned out I was trying to access login-related info in the redux store in the function called by `onEnter` and it wasn't configured yet by `boot-server.tsx`. A simple issue to correct once I found it. To help other poor souls it might be a good idea to move the `configureStore()` call before the match in the template so client and server-side work the same.\r\n\r\n[https://github.com/aspnet/JavaScriptServices/blob/dev/templates/ReactReduxSpa/ClientApp/boot-server.tsx](https://github.com/aspnet/JavaScriptServices/blob/dev/templates/ReactReduxSpa/ClientApp/boot-server.tsx)","author":{"url":"https://github.com/HaraldMuehlhoffCC","@type":"Person","name":"HaraldMuehlhoffCC"},"datePublished":"2017-02-11T11:36:54.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/663/JavaScriptServices/issues/663"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:05ccd320-a0fd-71a0-41b6-7792a7a2b651 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B5D2:3634E6:1DC9D47:28DB6FF:6973536E |
| html-safe-nonce | 6e31b63da3121d066452e4474f421fff13c1d4f35a106ad0ab9a8dd78faae31f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNUQyOjM2MzRFNjoxREM5RDQ3OjI4REI2RkY6Njk3MzUzNkUiLCJ2aXNpdG9yX2lkIjoiNzU5MDgxOTgxNTEwNzAyMzcyNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | db4981d1f73fb3744c3224e6bb24fc288d759806e26f6252af95e37f9c094b9d |
| hovercard-subject-tag | issue:206974961 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/aspnet/JavaScriptServices/663/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3604b990f8b70e00406875dd418f9e8b61fd7436370858255a5203ab67c0e118/aspnet/JavaScriptServices/issues/663 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3604b990f8b70e00406875dd418f9e8b61fd7436370858255a5203ab67c0e118/aspnet/JavaScriptServices/issues/663 |
| og:image:alt | I'm using onEnter in some Route elements that require authentication. On client-side things just worked; when rendered on server I got exceptions. As it turned out I was trying to access login-rela... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | HaraldMuehlhoffCC |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4cf879a11b0a28a85543899a36aaee9ec9ca2fb7bedad86c0da5731193c95f01 |
| turbo-cache-control | no-preview |
| go-import | github.com/aspnet/JavaScriptServices git https://github.com/aspnet/JavaScriptServices.git |
| octolytics-dimension-user_id | 6476660 |
| octolytics-dimension-user_login | aspnet |
| octolytics-dimension-repository_id | 45365298 |
| octolytics-dimension-repository_nwo | aspnet/JavaScriptServices |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 45365298 |
| octolytics-dimension-repository_network_root_nwo | aspnet/JavaScriptServices |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 63c75712c8aa15b01c097cbf3f10ca694d449599 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width