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