From 61350888f8e6dbc49855b8c5a078a9d40ba22bf4 Mon Sep 17 00:00:00 2001 From: Pavel Lang Date: Thu, 25 May 2017 02:22:01 +0200 Subject: [PATCH] Router receive whole react context --- src/client.js | 2 +- src/server.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client.js b/src/client.js index 637d36e64..19a38bc49 100644 --- a/src/client.js +++ b/src/client.js @@ -113,9 +113,9 @@ async function onLocationChange(location, action) { // it finds the first route that matches provided URL path string // and whose action method returns anything other than `undefined`. const route = await router.resolve({ + ...context, path: location.pathname, query: queryString.parse(location.search), - fetch: context.fetch, }); // Prevent multiple page renders during the routing process diff --git a/src/server.js b/src/server.js index dd793701d..3fd982403 100644 --- a/src/server.js +++ b/src/server.js @@ -116,9 +116,9 @@ app.get('*', async (req, res, next) => { }; const route = await router.resolve({ + ...context, path: req.path, query: req.query, - fetch: context.fetch, }); if (route.redirect) {