Skip to content

Commit 3a8573a

Browse files
Merge pull request #829 from gunnim/deserialize-null-ssr-disabled
disabling ssr causes error in react router
2 parents 38d1a9a + 6103888 commit 3a8573a

File tree

10 files changed

+40
-17
lines changed

10 files changed

+40
-17
lines changed

runs-msbuild.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ for %%s in (
1717
)
1818

1919
:notfound
20-
echo Could not find MSBuild.exe. Make sure Visual Studio 2017 is installed and try again.
20+
echo Could not find MSBuild.exe. Make sure Visual Studio 2019 is installed and try again.
2121

2222
:done
2323
pause

src/React.Core/JavaScriptEngineFactory.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ protected virtual void InitialiseEngine(IJsEngine engine)
139139
LoadUserScripts(engine);
140140
if (!_config.LoadReact && _scriptLoadException == null)
141141
{
142-
// We expect to user to have loaded their own version of React in the scripts that
143-
// were loaded above, let's ensure that's the case.
142+
// We expect the user to have loaded their own version of React in the scripts that
143+
// were loaded above, let's ensure that's the case.
144144
EnsureReactLoaded(engine);
145145
}
146146
}

src/React.Core/Resources/babel-legacy/package-lock.json

+10-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/React.Core/Resources/babel-legacy/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"babel-preset-stage-0": "6.24.1",
1414
"babel-standalone": "6.26.0",
1515
"webpack": "4.33.0",
16-
"webpack-cli": "3.3.2"
16+
"webpack-cli": "3.3.3"
1717
},
1818
"author": "",
1919
"license": "MIT"

src/React.Core/package-lock.json

+10-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/React.Core/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
"react": "16.8.6",
1313
"react-dom": "16.8.6",
1414
"webpack": "4.33.0",
15-
"webpack-cli": "3.3.2"
15+
"webpack-cli": "3.3.3"
1616
}
1717
}

src/React.Router/ReactRouterFunctions.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ public class ReactRouterFunctions : RenderFunctionsBase
99
{
1010
/// <summary>
1111
/// The returned react router context, as a JSON string
12+
/// A default value wards off deserialization exceptions
13+
/// when server side rendering is disabled
1214
/// </summary>
13-
public string ReactRouterContext { get; private set; }
15+
public string ReactRouterContext { get; private set; } = "{}";
1416

1517
/// <summary>
1618
/// Implementation of PreRender

src/React.Sample.Webpack.CoreMvc/Views/Home/Index.cshtml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
@Html.ReactRouter("RootComponent", new { initialComments = Model.Comments, page = Model.Page }, renderFunctions: chainedFunctions)
1616
@{
1717
ViewBag.ServerStyles = styledComponentsFunctions.RenderedStyles + reactJssFunctions.RenderedStyles;
18-
ViewBag.HelmetTitle = helmetFunctions.RenderedHelmet.GetValueOrDefault("title");
18+
ViewBag.HelmetTitle = helmetFunctions.RenderedHelmet?.GetValueOrDefault("title");
1919
}
2020
<script src="/dist/runtime.js"></script>
2121
<script src="/dist/vendor.js"></script>

src/React.Sample.Webpack.CoreMvc/package-lock.json

+10-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/React.Sample.Webpack.CoreMvc/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@
2727
"babel-loader": "8.0.5",
2828
"babel-runtime": "6.26.0",
2929
"webpack": "4.33.0",
30-
"webpack-cli": "3.3.2"
30+
"webpack-cli": "3.3.3"
3131
}
3232
}

0 commit comments

Comments
 (0)