module-federation-examples icon indicating copy to clipboard operation
module-federation-examples copied to clipboard

How to resolve the issue where the remote project depends on Redux, but the project using Module Federation does not use Redux?

Open prpr2012 opened this issue 10 months ago • 2 comments

prpr2012 avatar Feb 07 '25 06:02 prpr2012

@prpr2012 you can add redux to your module federation as well. but if you don't want to install it on the host then you can isolate your redux on your remote app too. you probably have reducer provided and store on remote app.tsx or bootstrap.tsx or any initizer which you haven't exposed. so expose the one that has redux provider and store as well.

anjitpariyar avatar Feb 19 '25 09:02 anjitpariyar

Youd need to self-wrap it in a provider or have the host wrap a generic provider around itself

ScriptedAlchemy avatar Feb 28 '25 00:02 ScriptedAlchemy