I have a webpage that uses NextJS. I would like to add, a vanilla React.JS app that is in another repo, to this NextJS website. Using Micro Frontend architecture. Is it possible? Where should I get started?
All suggestions are welcome.
Thanks
I have a webpage that uses NextJS. I would like to add, a vanilla React.JS app that is in another repo, to this NextJS website. Using Micro Frontend architecture. Is it possible? Where should I get started?
All suggestions are welcome.
Thanks
I think the answer is yes because Nextjs is built over the top of Reactjs. Nextjs uses the same structure as Reactjs.
There are a few options.
import dynamic from 'next/dynamic';
const MyOldApp = dynamic(
() =>
import('my-old-app/build').then(app => {
return app
})
)
const NewApp = () => {
return (
<main>
...
<MyOldApp />
</main>
)
}