From 5dd6dd3eb70b391cc8767b5cc8ed7c07bb65de47 Mon Sep 17 00:00:00 2001 From: Chad Burggraf Date: Thu, 1 Mar 2018 16:31:05 -0700 Subject: [PATCH] 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. --- src/React.Router/ReactRouterComponent.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/React.Router/ReactRouterComponent.cs b/src/React.Router/ReactRouterComponent.cs index 44c4bb17f..02dce30ca 100644 --- a/src/React.Router/ReactRouterComponent.cs +++ b/src/React.Router/ReactRouterComponent.cs @@ -69,7 +69,7 @@ protected override string GetComponentInitialiser() { return string.Format( @"React.createElement - ({0}, Object.assign({1}, {{ path: '{2}', context: context }}))", + ({0}, Object.assign({1}, {{ location: '{2}', context: context }}))", ComponentName, _serializedProps, _path