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

750
Vistas
Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?

I have this warning in my console, when I use nextJs Link component. Can you help me solve this problem and explain me why.

here is the console message

enter image description here

here is my piece of code

import React from "react";
import Image from 'next/image'
import Link from 'next/link'

import logo from '/public/Images/E2R5_white.png';


const Logo = () => {

    return (
        <div className="">
            <Link href="/">
                <Image
                    src={logo}
                    height="50"
                    width={"80"}
                    alt="Logo - E2R5"
                />
            </Link>
        </div>)
}

export default Logo;

Thank you for your help .

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

0

The quick solution is to use <a> tag inside Link.

 <Link href="/">
   <a>
      <Image src={logo} height="50" width={ "80"} alt="Logo - E2R5" />
   </a>
 </Link>

Useful link to read: https://nextjs.org/docs/api-reference/next/link#if-the-child-is-a-functional-component

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