Next.js Discord

Discord Forum

confusion with data fetching and loading

Unanswered
Birman posted this in #help-forum
Open in Discord
BirmanOP
https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming

I’m using the new app router and have route handlers for all the data fetching. How do I retrieve the data from the route handlers? I fetch from that route handler url (just to clarify). About the loading.js, I want the MUI <Skeloton /> component for each data fetch. How does it work since the documentation for loading.js is not that clear?

Also, I had to render the <AccountList /> component in layout.jsx in order to be shown on all pages.

0 Replies