Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

312
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda