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

151
Vistas
Storing a Boolean value in Redux so that I can use it in other pages to render something based on that value

so I’ve the following code where I’m Destructuring the Boolean value isTrue from permissionSender, and I tried exporting that constant directly then imported to the file I want and render a warning message in UI

export let isTrue;
{isTrue:false}=permissionSender

Then I’ll import it wherever I want and do like below

{istrue &&<warningmessage>}

Now, when trying to write test case for this I couldn’t Mock the Boolean value as I’m getting “isTrue is readonly value” error, as such I did some research and it turns out this is a wrong implementation and we need to store this Boolean value in Redux then use it from there but I’m absolute beginner in React so Redux is way advanced for me.

So can someone please help me store this property in Redux, I’d appreciate for the same

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