Y
Hacker News
new
|
ask
|
show
|
jobs
by
postalrat
2017 days ago
You could also do {iWantToRunThis && <ComponentUsesEffect...
1 comments
anonytrary
2014 days ago
I've seen a lot of people using this strategy -- creating a null component that just runs an effect. It works and is totally valid, but IMO increases the API surface area unnecessarily. It should work without resorting to this "hack".
link