-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Next.js sidecar with hooks #155
Conversation
* Adding a sidecar to get Rollup to expose header * Removing package.json
Are you also able to fix the externalized react issue on the original sidecar example? |
Yes for sure. Would you like me to open another PR for that one, or replace this one with that change? |
Could the two be merged? showcase hooks and class-based components? It also reduces my maintenance burden as the examples are getting quite long haha |
Yeah no problem. I'll combine the two examples and submit them as one in this PR. Thanks |
Appreciate it! |
@ScriptedAlchemy I have consolidated the examples. Ready for you to check it out. |
|
Will check it out! 🙏 |
@ScriptedAlchemy Something got messed up. I'm gonna close this and reopen a new one that's cleaner. |
thanks |
@Kinbaum @ScriptedAlchemy shared: { Please help on this issue and clarify if this fix is available in v2.3.1 of @module-federation/nextjs-mf (the latest that is available on the public npm registry). |
@Ruchika-saini you need the commercial version from privjs registry. Not npm |
This example addresses the issue with using hooks in federated components and consuming them in a Next.js application. There is no need to mark React or ReactDOM as external with this example.