Testing conditional rendering in child component
Hi, I am trying to test a particular interaction in my component.
I have two components, let's call them
Below is a code snippet from the Toast component:
The
The problem Im facing is that the code inside the <Show> does not seem to re-render and Im not sure why. I also console.log the value of toastVisibility and I can confirm that its initially set to false and after clicking the button, its set to true
I have two components, let's call them
Parent and Toast. Toast is a child of the Parent component. Below is a code snippet from the Toast component:
The
Parent component has a button that fires an API call. If there is an error in sending the API call, the signal that controls the visibility of the Toast component is set to TrueThe problem Im facing is that the code inside the <Show> does not seem to re-render and Im not sure why. I also console.log the value of toastVisibility and I can confirm that its initially set to false and after clicking the button, its set to true
