TL; DR If you’re pretty comfortable with what Redux selection is and how it works, remember these tips: Keep simple selectors simple For simple use cases where we want to do a straight property lookup, all we need to do in mapStateToProps is drill down to the property we need. For example: const mapStateToProps = […]
This author has yet to write their bio.Meanwhile lets just say that we are proud Alex contributed a whooping 12 entries.
Entries by Alex
When testing React components, I often reach for Enzyme.js, a library of testing utilities for React components developed by the team at Airbnb. It’s become a standard tool among React developers. Recently, I was testing a component that used state to determine the className given to a child component. Here’s the general idea in code: […]
Interactive forms I was recently working on a form in React that looked something like this: Shipping Address: User Name 123 My Street This Town, USA 45678 [ ] Use shipping address as billing address. Billing Address: User Name 456 Other Ave That City, USA 56789 I wanted the form to have the following traits: […]