I'm working on a micro-frontend project based on React js, Redux-Saga, and Webpack 5 Module Federation. There is a "ui-platform" project as a host and "image-ui" as a remote app.
image-ui > RemoteWrapper.js
import React from 'react';
import rootReducer from './redux/rootReducers';
import rootSaga from './redux/rootSaga';
const ImagePage = React.lazy(() => import('./pages'));
export const SCOPE = 'IMAGE';
const RemoteWrapper = (props) => {
const { store } = props;
store.injectModule(SCOPE, rootReducer, rootSaga);
return <ImagePage />;
};
export default RemoteWrapper;
I'm getting following error:
While there is a Provider tag in the ui-platform project as you can see in the error. If I wrap ImagePage in Provider, the error will be fixed but it must work well without provider tag in image-remote.
Could you please share your experience with me?
