Optimizing React Rendering
flexport.engineering
Optimizing React Rendering
1–10 of 79 posts
Re: Optimizing React Rendering
#2Re: Optimizing React Rendering
#3This is actually a pretty decent article, in part because it signals its audience properly: (semi-?)experienced React developers who haven't dealt with optimization yet.
Edit: sorry guys, didn't knew you were all on HN :(
Re: Optimizing React Rendering
#4Re: Optimizing React Rendering
#5> Fixing the issue is pretty simple*. We simply need to short circuit the re-rendering for a subtree if we know that the subtree hasn’t changed.
Not a frontend guy but I've seen this theme more than once on HN recently. It seems to me that addressing this anti-pattern would be built right in to modern React components. Isn't efficient DOM manipulation by pruning non-necessary changes kind of their thing?
Re: Optimizing React Rendering
#6From the article: > Fixing the issue is pretty simple*. We simply need to short circuit the re-rendering for a subtree if we know that the subtree hasn’t changed. Not a frontend guy but I've seen this theme more than once on HN recently. It seems to me that addressing this anti-pattern would be built right in to modern React components. Isn't efficient DOM manipulation by pruning non-necessary changes kind of their t…
Re: Optimizing React Rendering
#7From the article: > Fixing the issue is pretty simple*. We simply need to short circuit the re-rendering for a subtree if we know that the subtree hasn’t changed. Not a frontend guy but I've seen this theme more than once on HN recently. It seems to me that addressing this anti-pattern would be built right in to modern React components. Isn't efficient DOM manipulation by pruning non-necessary changes kind of their t…
Since these can be slow (although much faster than a DOM change), it makes sense to check and skip those steps when you can.
The focus of most of this article is how you can skip those steps when you're components input data is unchanged and common gotchas related to that.
Some other great posts in this vein are: https://facebook.github.io/react/docs/optimizing-performance... and http://benchling.engineering/performance-engineering-with-re...
Re: Optimizing React Rendering
#8From the article: > Fixing the issue is pretty simple*. We simply need to short circuit the re-rendering for a subtree if we know that the subtree hasn’t changed. Not a frontend guy but I've seen this theme more than once on HN recently. It seems to me that addressing this anti-pattern would be built right in to modern React components. Isn't efficient DOM manipulation by pruning non-necessary changes kind of their t…
This is one place where using Clojurescript wrappers of React has a real payoff - immutable datastructures make equality checking very very cheap.
Re: Optimizing React Rendering
#9Quick question - can printWasted be used with RN too?
Re: Optimizing React Rendering
#10 render() {
const views = this .props.dataList.map((d, i) => {
return
});
}
handleDelete(index) {
//...
}
I guess they just call that function from within the Data component with the correct parameter. But then, Data component needs to know how to call that function. Is there a better way?