DEV Community

Pavel Fedotov
Pavel Fedotov

Posted on

Is NextPage necessary when building NextJS apps in TypeScript

The most voted answer is not correct in my NextJs 15 project.

export default function Post: NextPage<Props> ({ project }) {
}

It asks for

 '=>' expected.

And in addition, this is not how the function is declared.

If we want to keep a function

export default function Post({

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs