refactor: react providers
This commit is contained in:
parent
89446a5d4e
commit
b2f84fde52
|
@ -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}));
|
||||
|
|
|
@ -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},
|
||||
}),
|
||||
},
|
||||
};
|
||||
|
|
|
@ -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]) => [
|
||||
|
|
Loading…
Reference in New Issue
Block a user