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

329
Vistas
I imported jsx files but can't use/ import it in ReactJS

I use these 2 classes :

auth.js

import React from 'react';
import log from './../components/log/';

const auth = () => {
    return (
        <div className='authPage'>
            <log />
        </div>
    );
};

export default auth;

index.js:

import React, { UseState } from 'react';
import signInForm from './signInForm';
import signUpForm from './signUpForm';

const log = () => {
...
};

export default log;

but I can't use log in auth.js, path is ok, name is ok, but i can't use it.

I never had this problem before and can't find anything on it pls if it happened to someone help me to solve this pls.

ESLint says: 'log' is defined but never used no-unused-vars, for the file auth.js but as you can see I am trying to use it

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

0

React components should start with uppercase letter. Try:

import React from 'react';
import Log from './../components/log/';

const Auth = () => {
    return (
        <div className='authPage'>
            <Log />
        </div>
    );
};

export default auth;

and export as

const Log = () => {
...
};

export default Log;
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