FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Next.js sidecar with hooks by Kinbaum · Pull Request #155 · module-federation/module-federation-examples · GitHub

Next.js sidecar with hooks - #155

Closed
Kinbaum wants to merge 48 commits into
module-federation:masterfrom
Kinbaum:master
Closed

Kinbaum wants to merge 48 commits into
module-federation:masterfrom
Kinbaum:master

Conversation

Kinbaum commented Jul 7, 2020

Copy link
Copy Markdown
Contributor

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.

jacob-ebey and others added 30 commits June 27, 2020 01:18
* Adding a sidecar to get Rollup to expose header

* Removing package.json
Kinbaum changed the title build: Initial build of Next.js sidecar with hooks Next.js sidecar with hooks Jul 7, 2020

Copy link
Copy Markdown
Member

Are you also able to fix the externalized react issue on the original sidecar example?

Kinbaum commented Jul 7, 2020
edited
Loading

Copy link
Copy Markdown
Contributor Author

Yes for sure. Would you like me to open another PR for that one, or replace this one with that change?

Copy link
Copy Markdown
Member

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

Kinbaum commented Jul 7, 2020

Copy link
Copy Markdown
Contributor Author

Yeah no problem. I'll combine the two examples and submit them as one in this PR. Thanks

Copy link
Copy Markdown
Member

Appreciate it!

Kinbaum commented Jul 7, 2020
edited
Loading

Copy link
Copy Markdown
Contributor Author

@ScriptedAlchemy I have consolidated the examples. Ready for you to check it out.

CLAassistant commented Jul 8, 2020
edited
Loading

Copy link
Copy Markdown


Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
3 out of 6 committers have signed the CLA.

✅ jacob-ebey
✅ ScriptedAlchemy
✅ Kinbaum
❌ jherr
❌ hanford
❌ remanation
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Copy Markdown
Member

Will check it out! 🙏

Kinbaum commented Jul 8, 2020
edited
Loading

Copy link
Copy Markdown
Contributor Author

@ScriptedAlchemy Something got messed up. I'm gonna close this and reopen a new one that's cleaner.

Kinbaum closed this Jul 8, 2020

Copy link
Copy Markdown
Member

thanks

Copy link
Copy Markdown

@Kinbaum @ScriptedAlchemy
Is this issue fixed? As I am still facing the issue with hooks.
I am using this package @module-federation/nextjs-mf@2.3.1 in Next JS application to federate a page. But whenever I have React hooks in remote module, I am getting this error "Uncaught Error: Invalid hook call".
Even I have this configuration as well

shared: {
'styled-jsx': {
requiredVersion: false,
singleton: true,
eager: true,
},
react: {
singleton: true,
eager: true,
requiredVersion: false,
},
'react-dom': {
singleton: true,
eager: true,
requiredVersion: false,
},
},

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).

Copy link
Copy Markdown
Member

@Ruchika-saini you need the commercial version from privjs registry. Not npm

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants


Back | FazBrowse Home | New Git URL