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

325
Vistas
Does props.[Name](value) send the value to the parent in order for it to be used?

Currently following a guide right now to learn React and HTML and I'm at this part where we create a filter drop down and pass the selected item to the parent of it.

In the filter js file I have :

const dateFilterHandler = (event) => {
    props.onChangeFilter(event.target.value);
}

and in the parent file, I have

const [filteredYear, setFilteredYear] = useState('2020')
const filterChangeHandler = selectedYear => {
    setFilteredYear(selectedYear);
};

  const dateFilterHandler = (selectedYear) => {
    console.log("Expenses.js");
    console.log(selectedYear);
  };

Correct me if I'm wrong but is the child code, (filter) taking the value of the drop down and putting it into props, then the parent file is taking dateFilterHandler to use the value that was "lifted" up into it?

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