question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nextjs module federation doesn't work when remote module uses hooks

See original GitHub issue

If a host consumes a module that uses hooks (useEffect) the host page displays a react hook error.

Please see this minimal repo to see it fail in action.

https://github.com/Pkearney2021/nextjs-mf-side-car-hooks

To make it work just simply comment out the useEffect

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
ScriptedAlchemycommented, Jul 20, 2021

Most likely, not enough funding to keep maintaining the landscape. Especially if we decide to include SSR capabilities

0reactions
tom-sanderson-btcommented, Dec 7, 2022

@ScriptedAlchemy Regarding the paid model , and the MIT licence, how is this working? I couldn’t see any other mention of a paid model on this site, is the package linked above different to the one on npm? Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack 5 module federation - hooks in remote module
Everything works great, but when I add hooks to the 'producer' module (the module from which the host application dynamically imports the ...
Read more >
Module Federation Support #33327 - vercel/next.js - GitHub
I used dynamic load technique for my remote library and it seems shared modules are not being fetched again and again now. They...
Read more >
[Solved]-Webpack 5 module federation - not working-Reactjs
I have both the host and remote project setup with this shared property. Fixed it for me when hooks broke my host app....
Read more >
AMA + Messing Around with Next.js & Module Federation
Hanging out for a little, while I attempt to get Module Federation working on Next.js.
Read more >
Microfrontend Module Federation: Exposing Remote from ...
While building a new portal with Webpack 5, React, and Module Federation, I wanted to include one of the components in a legacy...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found