Menu
Important
Stay updated on React2Shell

NEXTJS_UNNEEDED_GET_SERVER_SIDE_PROPS

Last updated March 4, 2025

Conformance is available on Enterprise plans

This rule will analyze each Next.js page's to see if the context parameter is being used and if not then it will fail.

When using to render a Next.js page on the server, if the page doesn't require any information from the request, consider using SSG with . If you are using to refresh the data on each page load, consider using ISR instead with a property to control how often the page is regenerated. If you are using to randomize the data on each page load, consider moving that logic to the client instead and use to reuse the statically generated page.

An example of when this check would fail:

In this example, the function is used to pass data from an API to the page, but it isn't using any information from the context argument so is unnecessary.

Instead, we can convert the page to use SSG with . This will generate the page at build time and serve it statically. If you need the page to be updated more frequently, then you can also use ISR with the revalidate option:

Or, you can use information from the context argument to customize the page:


Was this helpful?

supported.