---
title: "Comment by jaya prakash on \"Micro-frontends with Next.js and Module Federation\" | Hashnode"
description: "How can I expose a component which needs to do an API call to full fill that component? And when I&#39;m using that component in another repo it should be rende"
url: "https://hashnode.com/posts/micro-frontends-with-nextjs-and-module-federation/643c7152deeeb44486e99fbe/comment/64c26e7a3510fc491e1a9165"
---

[Discussion](https://hashnode.com/posts/micro-frontends-with-nextjs-and-module-federation/643c7152deeeb44486e99fbe)

Comment [Micro-frontends with Next.js and Module Federation](https://hashnode.com/posts/micro-frontends-with-nextjs-and-module-federation/643c7152deeeb44486e99fbe)

[jaya prakash](https://hashnode.com/@jai177)

[Jul 27, 2023](https://hashnode.com/posts/micro-frontends-with-nextjs-and-module-federation/643c7152deeeb44486e99fbe/comment/64c26e7a3510fc491e1a9165)

How can I expose a component which needs to do an API call to full fill that component? And when I'm using that component in another repo it should be rendered on the server side.

And tell me is there any way to do a serverside call in the next js component level not in the page level?

[Alibek Kazhibekov](https://hashnode.com/@alibekdev)

[Jul 27, 2023](https://hashnode.com/posts/micro-frontends-with-nextjs-and-module-federation/643c7152deeeb44486e99fbe/comment/64c26e7a3510fc491e1a9165#reply-64c273d7513c1c494e44e4cc)

What you want it is the new feature of Next.js called App Router, which is not supported by Module federation.

Here you can find how to fetch data on server-side directly in React components [nextjs.org/docs/app/building-your-application/dat…](https://nextjs.org/docs/app/building-your-application/data-fetching/fetching)

[jaya prakash](https://hashnode.com/@jai177)

[Jul 27, 2023](https://hashnode.com/posts/micro-frontends-with-nextjs-and-module-federation/643c7152deeeb44486e99fbe/comment/64c26e7a3510fc491e1a9165#reply-64c2772b513c1c494e44e516)

[Alibek Kazhibekov](https://hashnode.com/@alibekdev) For example, in the page router, we have a banner component, to show a banner image we need to do an API call to fetch the image. And I want a reusable component that I can expose and use in another repository and I want all this to happen from the server side. And How to call the SSR method inside the component.
