At The Gnar we are always reading, watching, and listening in order to keep our skills sharp and our perspectives fresh. Here are some of the resources we learned from this month.
Gone are the days when we need to write custom validators in Rails to determine if a start date begins before an end date! Back in 2021, the
ComparisonValidator was added to Rails 7. While useful for solving the date comparison example above, that’s not all it can do! It can also compare strings, and it allows for the flexibility of custom comparisons.
Earlier this month Rails added a feature allowing Active Storage variants to be pre-processed up front by adding
preprocessed: true to the variant definition. This makes the attachment ready to serve from the outset, rather than requiring the variant to be prepared/transformed on the fly.
There are a few new
Array functions included in ES2023,
Partial rendering allows you to create a consistent template with different sections, for example “title”, “body”, and “footer.” Then the templates can define content for each of those sections without having to know anything about the layout of the root template.
If you build React apps with TypeScript, you're certainly used to seeing and using the
React.FunctionalComponent) type at the declaration of your functional components. The folks maintaining create-react-app have decided to remove this type from their template as they believe it is more harmful than helpful. I tend to agree, particularly around the implicit definition of
- Ethan Fertsch
- Steve Zelaznik
- Taylor Kearns
Learn more about how The Gnar builds software.