Conditional Hook issues

I have a fair sized data set, and I have a switch that's on by default to not display a portion of the data to the UI.
Turning off the switch works as expected, causing the filtered data to be displayed, but if I toggle the switch back on, I get a conditional hooks runtime error because there are less effects in the render loop, but this is expected. Any suggestions on how to get around this?
2 Replies
MaartenBreddels
MaartenBreddels7mo ago
Could you share your code?
Soulscode
Soulscode7mo ago
Actually, I just found the solution. I was trying to filter the source data itself, instead of applying the filtering to the UI elements based on the data. React noobishness I'm presuming. 8D
Want results from more Discord servers?
Add your server