Microblogged: "3 Gripes With React"https://gist.github.com/jlongster/febd2a397aff9501abec0c2d66075ec8 …
-
-
At this point I think the most important thing is consistency: however you do it all of the app works that way (mixing them = worst of both)
-
Wait I thought cWRP *just* to help interop w/ 3rd party, non-react utilities? Isn't manually updating state from props in cWRP anti-pattern?
-
I don't think so. If you use `setState`, that depends on props, you have to. Forbidding that makes apps even uglier imho
-
Updating state based on props (not very common but happens) is the only supported use case for cWRP
-
But shouldn't that state be derived and pulled in render()?
-
Right - not very common, like he said :)
-
But then you don't need the hook at all
-
It's useful, rarely, when processing the props is CPU-intensive. Can happen in certain situations
- 23 more replies
New conversation -
-
-
If the value you pull is made by heavy computation. otherwise it doesn't really matter
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.