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

127
Vistas
Tracking state in URL params over multiple React components

I have a page which shows a list of items. These items are paginated, and can be searched, filtered, and ordered.

IndexComponent
-> SidebarComponent
   -> FilterComponentA
   -> OrderComponentB
-> ListContainerComponent
   -> SearchComponent
   -> PaginatedListComponent

There are several components here which have state related to the list which I want in the URL for page reload/URL sharing etc. The problem is that if we use react-router's useSearchParams() hook over multiple components they all end up with different versions of the searchParams and end up overriding each other due to immutability.

What is the best way to handle this situation so that we have minimal re-renders or state changes, without having to hardcode in the child state into the parent components (SidebarComponent shouldn't need to know if we add an extra filter option)?

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