dominic_cocch
Joined 14 years ago
Joined 14 years ago
Now Climeworks is building another facility that makes Orca seem tiny by comparison. The company broke ground on its Mammoth plant this week. With a CO₂ capture capacity of 36,000 tons per year, Mammoth will be almost 10 times larger than Orca."
A lot of negativity in this thread, oddly. This is a 10X improvement over a previous version. Another magnitude or two and this becomes incredible for the environment. Other solutions should also happen, but a problem as big as climate change should have many parallel solutions. We don't have time to put all our eggs in one basket.
We do have a couple side apps internally using React Router. We've liked it so far, but it's a pretty basic implementation.
I also think jQuery and other libraries with large usage are kind of Swiss army knives, so more people have more use for them.
I do believe over time React will become as pervasive as jQuery. Or possibly even the DOM api will eventually allow a similar style of building things natively. This seems to be happening to jQuery now :)
If your list is totally static, an index will do the job. However, we usually end up appending something like an id from the db since almost nothing on Instacart is static.
We're still somewhat tangled in with Backbone, but it's been a great success internally. Performance-wise, development speed-wise and also developer happiness-wise we haven't hit too many snags.
We try to keep the structure of the html so that wrappers generally keep different UI components separate from each other. In other cases, like in the example in the blog post, we just use the index from the .map() loop to add a key to every element we know will need one. React should also warn you when this is an issue.
Backbone also has a dependency on jQuery, which isn't very useful in React apps since mutatuing the DOM (one of jQuery's main purposes) is a no no. So most of the Backbone library isn't very useful to us anymore. I do still really enjoy the backbone way of fetching and saving models, especially in a Rails context. But I think we can get those features in other ways.
We've also at times converted backbone models to simple objects at the parent level and passed them down that way. Keeps things simpler, but we lose some of the niceties of the backbone model api. Once the models are objects, you can use componentShouldUpdate pretty defensively if you need.
We've also used throttled and debounced functions for anything which gets hit very heavily.
I think it'd be interesting for us to do another post in the future about how we measure and improve performance within our React apps. There aren't a ton of articles about this with relation to Bakcbone, it seems.
Thanks for giving it a read!
I can't seem to edit the title of the HN article anymore. Must be past a certain time or something.
Thanks for checking it out! I'll put some thought into the 'C' aspect of this thing.
@Dominic_Cocch