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

328
Views
What does the error JSX element type 'Header' does not have any construct or call signatures" mean?

I wrote this code and the error is showing at Header and List. It keeps saying that JSX element type Header does not have any construct ....?

import React, { useEffect, useState } from 'react';
import logo from './logo.svg';
import './App.css';
import axios from 'axios';
import { Header, List } from 'semantic-ui-react';


function App() {
  const [admin, setAdmin] = useState([]);


  useEffect(() => {
    axios.get('http://localhost:5000/api/admin').then(response => {
      console.log(response);
      setAdmin(response.data);
    })
  }, [])

  return (
    <div>
      <Header as='h2' icon='users' content='Reactivities'/>     
          <List>
          {admin.map((AppUser: any) => (
            <List.Item key={AppUser.id}>
              {AppUser.city}
            </List.Item>
          ))}
          </List>
          </div>
  );  
}

export default App;
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I was struggling with the same error for a pretty long time. Finally, the reason for me was an incompatibility of versions. It got fixed with this combination:

"react": "^17.0.2",
"react-dom": "^17.0.2",
"semantic-ui-react": "^2.1.2"
"@types/react": "^17.0.3",
"@types/react-dom": "~17.0.3"
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!