We are tackling an interesting problem involving module federation. Our setup involves embedding a Next.js application within a React shell. However, we’re encountering a significant issue: when using next/link inside the Next.js app, it triggers a full page reload of the entire application rather than a seamless client-side navigation.
Here’s what we’ve tried so far:
• Customizing the <Link> component to prevent reloads
• Leveraging next/router for navigation within the Next.js app
Despite these efforts, we haven’t managed to resolve the issue. We’re considering developing a custom solution to address this, but we’d greatly appreciate any suggestions or insights from the community.
We are specifically interested in:
1. Approaches to prevent full page reloads while using next/link in a module federation setup.
2. Workarounds or alternative strategies to integrate Next.js within a React shell without reloading the entire application.
3. Best practices and known issues related to module federation with Next.js and React.
Any guidance or experiences you can share would be extremely valuable. Thanks for your help!
Here’s what we’ve tried so far:
• Customizing the <Link> component to prevent reloads • Leveraging next/router for navigation within the Next.js app
Despite these efforts, we haven’t managed to resolve the issue. We’re considering developing a custom solution to address this, but we’d greatly appreciate any suggestions or insights from the community.
We are specifically interested in:
1. Approaches to prevent full page reloads while using next/link in a module federation setup. 2. Workarounds or alternative strategies to integrate Next.js within a React shell without reloading the entire application. 3. Best practices and known issues related to module federation with Next.js and React.
Any guidance or experiences you can share would be extremely valuable. Thanks for your help!