mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 00:09:23 +02:00
[GH-ISSUE #533] feat: streamline vinext + module-federation/vite #109
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#109
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gioboa on GitHub (Mar 13, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/533
Hi, congratulations for this amazing project. 👏
I created an example using @module-federation/vite, and everything works fine. Here is the code
However, I ran into the problem of having multiple react instances at runtime.
I found a workaround, the idea is to have a method that exposes the host react instance for consumers.
I took inspiration from the Nuxt API useNuxtApp.
With Nuxt, for example, you can use
const { $pinia } = useNuxtApp();to retrieve the unique state instance and use that one inside multiple applications.Would you mind thinking about a public API to support this scenario?
@southpolesteve commented on GitHub (Mar 16, 2026):
Woah! That is super cool. Yeah I am definitely open to it. Feel free to suggest what this should look like