Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

313
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!