React 16.2 released, AWS AppSync & the HOC vs render prop debate
This week React 16.2 was released and now includes support for fragments!
🍬Goodies in this week's newsletter🍬
- Improve performance in your React application using Chrome DevTools
- Debate the pros and cons of higher order components vs render props
- Integrate AWS S3 with your React Native application
- Explore the new AppSync service for GraphQL from AWS
- Create a form with a new form library from Erik Rasmussen, the creator of Redux Form
React 16.2 is now available! The biggest addition is improved support for returning multiple children from a component’s render method. The feature is called "fragments". A common pattern is for a component to return a list of children and prior to React 16, the only way to do this was to wrap the children in an extra
<span>. With the release of React 16, you could put your children in an array removing the need for the extra elements, but this caused some confusion. To provide a more consistent authoring experience for fragments, React now provides a first-class Fragment component that can be used in place of arrays. Check out the blog post detailing how to add fragments to your React application.
Recently James Kyle tweeted out a poll on Twitter -- Which do you prefer: "Higher-Order Components" or "Render Props"?
The resulting conversation between Sebastian Markbage, Ryan Florence and a few others is a really interesting discussion on the pros and cons of both approaches. Check it out!