React provides a few super useful top-level methods for manipulating this.props.children
to produce the desired output. This is particularly helpful when those children are not explicity known beforehand. React.Children.map works the same as the Array.prototype.map to loop over each child and apply a function, then return a new set. »
If you're new to React, you'll run into a few quirks that aren't immediately apparent. If you know what to watch out for, these head scratchers won't ruin your day. »
Using ES6 classes to write React components has the drawback of requiring us to bind custom methods inside the constructor
: »
If you manage your Node versions with NVM and also prefer Yarn over NPM, you'll soon realize that when you install a new version of node, Yarn's references to your globally installed packages are lost. »
Promises are a step up from using callbacks to deal with asynchronicity for several reasons. They're composable and chainable, and help remedy issues created by callback trees as they become more complex. Callbacks don't execute in parallel or provide simple error handling like promises do. We can easily pass them around and integrate elsewhere even though we don't have their values yet. »