Proposal of adding a new example #2652
Replies: 3 comments 2 replies
-
storybook can stay, a full example would be nice! |
Beta Was this translation helpful? Give feedback.
-
Awesome job @ahoward2! I immensely liked your article and how you approached everything explaining even the terminology, one concern I have looking at your package (@rocket-science/event-client) is the fact that it could break on the server side because of the use of the window object, I assume you consider the app will run only on client-side. I already worked with events on the In general, events are an excellent way to share/communicate state changes between isolated federated containers, and EDDL is a powerful way to abstract and moves these events to a proper layer of our MF application. Google has a good package that abstracts the EDDL and gives some powerful functions to it very https://github.com/google/data-layer-helper Finally, I would love to hear from you if you already used your set of tools with React SSR or with Next.js 🙂 |
Beta Was this translation helpful? Give feedback.
-
Typically you would add event listeners in useEffects which is fine if you're using SSR since they don't run on the server. In what cases might this be insufficient or in what cases would you want components to emit / add event listeners on the server? RSC may be a different story though. |
Beta Was this translation helpful? Give feedback.
-
Hey everyone!
Based on the work done recently to the FederatedTypesPlugin - I was excited and wanted to put together a comprehensive example and accompanying blog post using it.
The premise is using Zod to validate event payloads to get type safety between host and remotes. This wasn't possible until recently! The apps are configured to run locally and also pointing to the remote hosted on the unpkg cdn.
Wanted to get any community feedback/suggestions on the rough drafts.
Notes:
Once this is in a good state and there aren't any major pushbacks I'll open a PR to the module-federation-examples, reference it in the blogpost and add a back-link to the post in the example once the blogpost is live.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions