Pragmatic uses for React Context

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. ...

July 24, 2019 · 4 min · Skyler Lemay

How to Resolve Accessibility Issues with React Helmet

The lang attribute is an essential part of the HTML element. It identifies the main language of the document’s content. This is used by screen readers to determine the pronunciation of words. Screen readers have a default language setting, but will respect the language specified in the html element if they differ. However, if this attribute is missing, and the language of the document is different than the screen reader’s settings, the user will receive a subpar experience with incorrect pronunciations. For more information on the accessibility of this attribute, check out Deque University’s detail page. ...

May 28, 2019 · 3 min · Skyler Lemay

Pragmatic Lessons from Converting to React Hooks

Hooks may not be the death of class based components, but they do encourage critical thought before reaching for a class component. 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. ...

February 6, 2019 · 7 min · Skyler Lemay

Conceptualizing and Creating a New Portfolio

Imagination is the living power and prime agent of all human perception. ~Samuel Taylor Coleridge I am so excited to announce that the redesign of my portfolio and blog is finally live after going back to to the conceptual drawing board and rebuilding it from the ground up. It has been an exciting journey to implement new development and design concepts that I have picked up since May 2017 when I built the first version of the site. At the time, it was the first full site that I had put together, and was substantially more involved than the relatively small projects I had done to that point. Since then I worked on more complex applications, built a full stack travel application with a team of two other developers, and dove headfirst into React. ...

February 13, 2018 · 12 min · Skyler Lemay