小编GCB*_*GCB的帖子

找不到模块:无法解析 Next.js - TypeScript

\n

我收到 image\xc2\xb4s 错误,但我不明白 \xc2\xb4t 为什么会收到它。\n还附上了第二张图片中的目录。

\n
\n

在此输入图像描述

\n
import Link from \'next/link\';\nimport { useState } from \'react\';\nimport { ProductModel } from \'../models/product\';\nimport { CardProduct } from \'../components/CardProduct\';\n\nconst List = () => {\n\n  let list: ProductModel[] = [  //ProductModel[] esto significa que va a ser un array de ProductModel\n    {\n      id: 1,\n      name: "shoes",\n      price: 9999,\n    },\n  ];\n\n  const [products, setProducts] = useState<ProductModel[]>(list);\n\n  return (\n    <div>\n      Soy la p\xc3\xa1gina de Productos\n      {products.map((element, index) => {\n        return <CardProduct product={element}/>;\n      })}\n      <br/>\n …
Run Code Online (Sandbox Code Playgroud)

typescript reactjs react-native next.js

10
推荐指数
1
解决办法
2万
查看次数

标签 统计

next.js ×1

react-native ×1

reactjs ×1

typescript ×1