disabling ssr causes error in react router#829
Merged
dustinsoftware merged 5 commits intoreactjs:masterfrom Jun 7, 2019
Merged
disabling ssr causes error in react router#829dustinsoftware merged 5 commits intoreactjs:masterfrom
dustinsoftware merged 5 commits intoreactjs:masterfrom
Conversation
Happens when server side rendering is disabled.
(cherry picked from commit 27617d0)
Member
|
Thanks, I’ll merge this into the 4.x stable branch and release it there as well. |
Member
|
This is published in 5.0.0-alpha7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi guys, long time no see :)
There seems to be an error from at least 4.1.1 and onward (tried 4.2 and 5) which causes a null exception in
React.Router.ReactRouterComponent.RenderRouterWithContext
line 69:
JsonConvert.DeserializeObject<RoutingContext>(reactRouterFunctions.ReactRouterContext)This happens since when we disable SSR, ReactRouterFunctions never creates a context object in the js engine.
An extremely low effort quick fix follows, providing a default value for routerContext.