Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

147
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!