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

95
Views
ESLint react/display-name error on next.js dynamic import

I'm getting the following error from ESLint:

Component definition is missing display name

On the following code:

const Disqus = dynamic(() => import('@/components/blog/disqus'), {
  ssr: false,
  loading: () => (
    <div className="text-center">
      <Loader />
    </div>
  ),
})

Specifically, it is the code starting with the arrow function in the loading property on line 3.

I've followed the advice in the docs for this error but have not been able to solve the problem.

Any advice would be welcome (I do not want to disable the rule unless there is no other option)

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

After an hour of trying, then posting this question, I found the answer to be something I thought I'd tried:

const Disqus = dynamic(() => import('@/components/blog/disqus'), {
  ssr: false,
  loading: function Disqus() {
    return (
      <div className="text-center">
        <Loader />
      </div>
    )
  },
})

Using a named function instead of an arrow function.

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!