I want to export my react component along with redux store Provider. So, I wrap the component with this exportWithState callback, but I think I'm not dealing with these props the right way? As I'm unable to get props in my component that are passed from the application that is using my component.
export const exportWithState = (Component) => (props) => {
return (
<Provider store={store}>
<Component props />
</Provider>
)
}
import {MyComponent} from "./components/my-component";
const MyComponentWithState=exportWithState(MyComponent);
export {MyComponentWithState};
Are the props passed from the Application that is using my component should be at the second arrow of callback?