Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

126
Vistas
Mapping an array in my Next JS app not working

In my Next JS app I'm getting array and mapping them for the nav bar. but when i do it throws an error of TypeError: _utils_navigation__WEBPACK_IMPORTED_MODULE_6___default(...).map is not a function. my code is as follows.

{NavRoutes.map((navs, index) => {
            console.log(navs.title);
            console.log('bhsjvhjvs');
            return (
              <Link href={navs.link}>
            <div className={`${
              router.asPath === navs.link 
              ? "text-active-red"
              : ""
            }`}>{navs.title}</div>
          </Link>
            )
          })}

and the array

const NavRoutes = [
    {
      title: "HOME",
      link: "/"
    },
    {
      title: "NEWS",
      link: "/news"
    },
    {
      title: "CHANNEL",
      link: "/channels"
    },
    {
      title:"SHOWS",
      link: "/shows"
    },
    {
      title: "SCHEDULE",
      link: "/schedules"
    },
    {
      title: "CONTACT",
      link: "/contact"
    },
]

export default NavRoutes;

so how can i work through this?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

check how you have imported it. It should be like this

import NavRoutes from "../utils/navigations.js";

And apart from this, try to console NavRoutes and check you are getting expected value or not.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda