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

398
Vistas
Brand new project with no code other than App.js: Error: Invalid hook call. Hooks can only be called inside of the body of a function component

When trying to use the CountdownCircleTimer from react-countdown-circle-timer, I get the following errors in my browser:

enter image description here

enter image description here

enter image description here

I only have the following code, absolutely nothing else, no other components in my React project:

import './App.css';
import { CountdownCircleTimer } from "react-countdown-circle-timer";


function App() {
  return (
    <div className="App">
      <Timer/>
      <CountdownCircleTimer
        isPlaying
        duration={10}
        colors={[
          ["#004777", 0.33],
          ["#F7B801", 0.33],
          ["#A30000", 0.33],
        ]}
      />
    </div>
  );
}

export default App;

Here is what my package.json looks like:

"dependencies": {
    "react": "^17.0.2",
    "react-countdown-circle-timer": "^2.5.4",
    "react-dom": "^17.0.2"
  }

Here is my index.js file:

import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';

ReactDOM.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
  document.getElementById('root')
);

I am at a loss as to why this is happening. What can I do to fix it? This is a brand new React project and I wanted to test this component inside App.js before moving forward.

Thank you.

about 4 years ago · Juan Pablo Isaza
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