What we've got here is a server fetch to NASA APOD API (aka Astronomy Picture of the Day)
thru an async function, once the response then the data is passed to the client in order to interact with it.
An API KEY is mandatory in order to be able to hit the endpoint with expanded usage
What I've learned:
- SSR + ISR + SSG strategies
- Since NextJS 15, dynamic routing are asynchronous; so, await is needed in order to get params and query params (more info).
- Dynamic metadata, was used alongside dynamic routing in order to be SEO friendly (more info).
- Thanks to 'use cache' directive apod list and single apod are cached. It means, single apod are served from NextJs cache and not from Nasa response after it retrieved for the first time. Same for the apod list.
- Shadcn button asChild property allows to make a child component like a Button; this behavior is needed in order to work alognside NextJs's Link (more info).

























































































