Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Module not found: Can't resolve Next.js - TypeScript

$
0
0

I receive the image´s error but I don´t understand why do I get it.Also attached the directory in the second image.

enter image description here

import Link from 'next/link';import { useState } from 'react';import { ProductModel } from '../models/product';import { CardProduct } from '../components/CardProduct';const List = () => {  let list: ProductModel[] = [  //ProductModel[] esto significa que va a ser un array de ProductModel    {      id: 1,      name: "shoes",      price: 9999,    },  ];  const [products, setProducts] = useState<ProductModel[]>(list);  return (<div>      Soy la página de Productos      {products.map((element, index) => {        return <CardProduct product={element}/>;      })}<br/><Link href="/"><a>Ir a la home</a></Link></div>  );}export default List;

enter image description here


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>