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

221
Vistas
How to fetch inputed data from state hooks of my input js file from my search js file in react

this is how ive set up my search js file to search through the api data but i want to call my inputted data as well so i can search for both. the way its set up right now is that there is an api woth an array of objects each data has the name, email etc and this calls this so under each one i have my a search bar to input my data and can input as many tags as i want for each. Now i just want to call the hook state data into this js file to search but im not sure how to do it, any help would be appreciated.

class Search extends Component {
    constructor(props, tag) {
        super(props);
        this.state = { 
            searchString: "",
            searchTagString: "",
            data: [],
            //tags: tag
            
    
        };
        this.handleChange = this.handleChange.bind(this);
    }
    componentDidMount(tag) {
        this.setState({
            data: 'api placeholder',
           // tags: tag
        
            
        });
        
        // this.refs.search.focus();
    }
    handleChange() {
        this.setState({
            searchString: this.refs.search.value,
            // searchTagString: this.search.value
            
        });
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