1: Can a react person explain something to me? People say that higher order components are faster than render props because they avoid
-
Show this thread
-
2: allocating a closure. But the higher order component pattern does at least one (and usually more) allocations when it copies the props
2 replies 1 retweet 5 likesShow this thread -
3/3: am I miscounting the costs or what?
5 replies 1 retweet 2 likesShow this thread -
Replying to @wycats
Yeah, hard to compare the allocation costs. My belief is that render functions do not allow receiving components to shouldComponentUpdate.
1 reply 0 retweets 1 like -
The render prop could close over variables that the child component cannot discern. Thus cannot accurately determine whether to re-render.
1 reply 0 retweets 0 likes -
That being said, I think we've actually gone overboard with shouldComponentUpdate and HOC for
@asana.1 reply 0 retweets 0 likes -
I want to run a perf experiment to see what happens when we remove it.
1 reply 0 retweets 0 likes
Ah! I wasn't thinking about this because Glimmer creates sCU automatically, so it handles the render prop case fine. Valid critique.
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.