Hacker News new | past | comments | ask | show | jobs | submit login

I think the recommended pattern if you need a "conditional effect" would be to just move the `if (expanded)` inside the effect instead of wrapping it.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: