# NEXTJS_NO_FETCH_IN_SERVER_PROPS

Since both `getServerSideProps` and API routes run on the server, calling `fetch` on a non-relative
URL will trigger an additional network request.

## How to fix

Instead of using `fetch` to make a call to the API route, you can instead share the code in a shared
library or module to avoid another network request. You can then import this hared logic and call directly
within your `getServerSideProps` function, avoiding additional network requests entirely.


--------------------------------------------------------------------------------
title: "NEXTJS_NO_GET_INITIAL_PROPS"
description: "Requires any use of getInitialProps in Next.js pages be reviewed and approved, and encourages using getServerSideProps or getStaticProps instead."
last_updated: "2026-02-03T02:58:39.157Z"
source: "https://vercel.com/docs/conformance/rules/NEXTJS_NO_GET_INITIAL_PROPS"
--------------------------------------------------------------------------------