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

108
Vistas
Access component method and excute it from out side by react js

I have a component called <FormComponent/> and it includes the method named onSubmit.

      const FormComponent = () => {
          const [input, setInput] = useState('')
          const onSubmit = () => {do somthing}
           <form>
            <input type="text" placehold="fullName" name="full name" value={input} onChange={setInput(e.target.value)}/>
           </form>
        }

    const app = () => {
       return (
        <FormComponent /> 
        <button type="submit">Submit</button>
       )
    }

now I want when clicking on the button which inside App component, the onSubmit method inside the FormComponent to be executed

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