Webcast – Class-Free React
Recorded Friday December 4th
Welcome! I was very excited when the React team announced pure components. We’ll talk about why that’s important, and how it can impact your React development. We’ll also talk about some component composition patterns, and you’ll get a preview of Redux. We’ll go into a lot more Redux detail in a future webcast.
- React Pure Component Starter The example repo. After clone,
git checkout 93b7017
- Composition Over Inheritance
- React Stamp.
- Getting Started with Redux course by Dan Abramov (creator of Redux).
- Stamp Specification.
- React Stamp.
- 5 Questions Every Unit Test Must Answer.
- Why I Use Tape Instead of Mocha and So Should You.
- Cheerio Great for unit testing component render output.
- Deep Freeze Make sure your reducers are immutable in your unit tests.
Classes have a number of drawbacks, and contrary to popular belief, React is not immune to them. Thankfully, there are some great alternatives that will make your React components easier to work with and share across your app, and even completely unrelated apps and projects.
React 0.14 introduced the ability to create pure components, and the popularity of higher order components for composition has spread through the React community as an alternative to mixins. You can even use stamps: react-stamp brings stamp-based factory composition to your React components.
This webcast will walk you through the process of creating your first pure component and teach you how to use component composition techniques instead of class inheritance to create and reuse component behaviors.
- Pure Components
- How to Unit Test Pure Components
- Stamp Composition & React-stamp
- Higher Order Components (HOC)
- When to Use Smart vs Dumb Components