我应该如何处理 next 和 typescript 中的 NextFC 类型
How should I handle NextFC type in next and typescript
我找不到 NextFC
类型。
我用{ "next": "9.0.5" }
NextFC 存在于 @types/next
,但 NextFC 存在于 next/types
。
TypeScript 导入 next/types 优先于 @types/next.
所以,
import { NextFC } from 'next';
正在发生 "NextFC is not undefined in node_modules/next/types"
的错误
我能做什么?
@types/next
在 NextV9 中被弃用。
所以我会用next/types
.
Ex) Next.NextFC
→∀
NextPage
在 pages/*
NextComponentType
在 components/*
我找不到 NextFC
类型。
我用{ "next": "9.0.5" }
NextFC 存在于 @types/next
,但 NextFC 存在于 next/types
。
TypeScript 导入 next/types 优先于 @types/next.
所以,
import { NextFC } from 'next';
正在发生 "NextFC is not undefined in node_modules/next/types"
的错误我能做什么?
@types/next
在 NextV9 中被弃用。
所以我会用next/types
.
Ex) Next.NextFC
→∀
NextPage
在 pages/*
NextComponentType
在 components/*