Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

150
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda