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

271
Vistas
How to remove a slice / reducer in a redux store?

In the register component of my APP, the state is stored in a redux slice. After the user registers, this component will never be rendered again and thus the memory in its redux slice should be freed up for performance.

How can this be done?

about 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

The performance gain from freeing up a tiny bit of memory is negligible if even measurable, don't bother.

about 4 years ago · Santiago Trujillo Denunciar

0

Can I dynamically add / remove slice of the state ?

Yes you can remove / add dynamically a slice of the state with redux, this is usually done for code splitting reasons

How to do it ?

You can follow this steps to achieve it: https://redux.js.org/usage/code-splitting

Note

I agree with @timotgl note, based on what you have in this slice this is negligible

about 4 years ago · Santiago Trujillo Denunciar

0

Redux is generally used for global state. What you are describing is local state, and should probably be moved out of redux, and into local component state. You could keep your reducer, actions, and selectors, and just refactor them into a call to React.useReducer instead of redux.

about 4 years ago · Santiago Trujillo 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