Skip to content

Commit 5dd6dd3

Browse files
committed
Replace "path" with "location" for SSR + React Router.
According to the documentation, as well as my testing, React Router expects the URL supplied to `StaticRouter` to be provided via the `location` prop name. React.NET currently supplies this value via the `path` prop name.
1 parent bfd1360 commit 5dd6dd3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/React.Router/ReactRouterComponent.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ protected override string GetComponentInitialiser()
6969
{
7070
return string.Format(
7171
@"React.createElement
72-
({0}, Object.assign({1}, {{ path: '{2}', context: context }}))",
72+
({0}, Object.assign({1}, {{ location: '{2}', context: context }}))",
7373
ComponentName,
7474
_serializedProps,
7575
_path

0 commit comments

Comments
 (0)