Logo

Tag: React Hooks

Linked List - 20190822

August 22, 2019
The Linked List is a collection of interesting articles that I have recently read and found beneficial. Today's links cover web accessibility, TypeScript adoption, and React Hooks. Hey Domino’s, You’re Not Delivering: Recently Domino's petitioned the United States Supreme Court saying that they did not need to make their website accessible. This post breaks down how the current website experience affects real people and callouts for areas of improvement. An Intro To Screen Reader Testing for Sighted Developers: This is a great article and introduction into using a screen reader for accessibility verification. Automated testing cannot catch all accessibility errors, including focus management. Getting some time using a screen reader is a…
Read More

Pragmatic uses for React Context

July 24, 2019
chains-perspective
The purpose and use case for the React Context API long eluded me. I was familiar with what it did in principle, but struggled to find a use case for it. The Context API can solve some unique problems such as: grouping localized text strings and creating a language provider. In this post I share how the Context API can help solve these problems, as well as some sample code. According to the React docs: Context provides a way to pass data through the component tree without having to pass props down manually at every level Passing Localized String Props Localized applications bring a host of various complexities, one of which being an increase in the amount of props for localized text. The removal of any hard coded text strings can quickly…
Read More

Pragmatic Lessons from Converting to React Hooks

February 6, 2019
Code diff from converting React Component to Hooks
Last week I decided to install the React 16.8 alpha on a branch and experiment with React Hooks in preparation for their release on February 6, 2018. The site utilized a render prop based Slideshow component in several places as well as a handful of other class based components. Through this process, I was able to consolidate the application code and eliminate all class based components from the site's code base. The React team does not recommend refactoring your entire codebase to Hooks on their release. I did this primarily as a means to engage with the Hooks API in a relatively small codebase. You can find the code conversion to Hooks discussed in this post at the related PR. Converting to Hooks and lessons learned The Hooks…
Read More
2022 Skyler Lemay. All Rights Reserved.