Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
dceddia
on Oct 26, 2018
|
parent
|
context
|
favorite
| on:
Introducing Hooks
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: