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

260
Vistas
Uncaught RangeError: Maximum call stack size exceeded can't figure out why

I'm getting a state variable (formData) as props from parent in this child component which I'm working on. I have an email input with onChange validation which also searches for the email in our database.I have a onFormFeildsChange which is a function in another file, is setting the fromData and validating it. Once the validation is done I'm hitting an API in the " getCandidateByEmail " function to know whether this email exist or not. But the code won't move past the await function. I also tried using then() but I get the same error. Please help understand the issue with my code.

const getCandidateByEmail = async () => {
console.log("in getCandidateByEmail before");

const response = await getCandidateByEmail({
  email: formDataProp?.formData?.email?.valueText,
});

}

The use Effect:-

useEffect(() => {
if (validationStatus?.emailValid) {
  console.log("in useffect email valid");
  getCandidateByEmail();
}

}, [formDataProp?.formData?.email?.valueText]);

The input JSX :-

<input
              defaultValue={formDataProp?.formData?.email?.valueText}
              type="email"                
              placeholder="Email of candidate"
              onChange={($event) => {
                onFormFeildsChange(
                  $event,
                  formDataProp?.formData,
                  formDataProp?.setFormData
                );

} />

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

My function and the API call inside that function both had the same name which was causing this infinte loop

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