From b2f84fde529b241c20ba1138a440501f77d25b19 Mon Sep 17 00:00:00 2001 From: cha0s Date: Tue, 19 Jan 2021 11:38:18 -0600 Subject: [PATCH] refactor: react providers --- packages/react/src/client.js | 2 +- packages/react/src/server.js | 3 +-- packages/redux/src/client/index.js | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/react/src/client.js b/packages/react/src/client.js index 6989051..dc8cfa8 100644 --- a/packages/react/src/client.js +++ b/packages/react/src/client.js @@ -17,7 +17,7 @@ export default { .map(async ([key, Component]) => [key, await Component]), ), ); - const Providers = await latus.invokeOrdered('@latus/react/client/providers'); + const Providers = await latus.invokeOrdered('@latus/react/providers'); const RootComponent = () => { const children = Object.entries(Components) .map(([key, Component]) => React.createElement(Component, {key})); diff --git a/packages/react/src/server.js b/packages/react/src/server.js index 4e0d998..b3b4e4b 100644 --- a/packages/react/src/server.js +++ b/packages/react/src/server.js @@ -56,10 +56,9 @@ export default { client.use.push(middleware); }, '@latus/http/plugins': (req, { - config: {'@latus/react': {providers, entry}}, + config: {'@latus/react': {entry}}, }) => ({ [entry]: {}, - '@latus/react/client': {providers}, }), }, }; diff --git a/packages/redux/src/client/index.js b/packages/redux/src/client/index.js index bac0aae..8a1b18b 100644 --- a/packages/redux/src/client/index.js +++ b/packages/redux/src/client/index.js @@ -5,7 +5,7 @@ import {storageSubscription} from './storage'; export default { hooks: { - '@latus/react/client/providers': async (latus) => { + '@latus/react/providers': async (latus) => { const slices = latus.get('%slices'); const store = latus.get('%store'); const subscriptionReducers = Object.entries(slices).map(([key, slice]) => [