hashnode.blainegarrett.comSnippet: Material UI Responsive Icon ButtonFrom time to time, I find myself needing a Material UI Button with an icon and label that collapses the label text down on smaller screens, essentially turning it into an IconButton. I've written various approaches to this several times and decided i...Feb 21, 2023·2 min read
hashnode.blainegarrett.comTypeScript Conditional ScenariosI started on my TypeScript journey in December 2019. I'm still finding interesting bits that I want to explore and understand more. One such find was a tweet by Erik Rasmussen noting how the Material-UI team leverages types to enforce passing an arr...Apr 3, 2021·9 min read
hashnode.blainegarrett.comAccessing Available Devices in Browser via getUserMedia()The Covid-19 pandemic got me scrambling to come up with some web based solutions to support local Summer art festivals. In April I started digging into WebRTC as a potential in-browser low-barrier-to entry Real Time video solution. After some success...Sep 26, 2020·7 min read
hashnode.blainegarrett.comEuclidean Distance in N dimensions and Naive Image QuantizationWhen I pitched this article to my graphic designer wife, she looked at me like I was speaking in tongues. However, I can't think of a more concise title. What this article will ultimately discuss is how something as seemingly non-quantitative as colo...Sep 18, 2020·9 min read
hashnode.blainegarrett.comHTML 5 Canvas, React Refs and TypeScriptRefs in React have gone through several changes since their introduction. With the release of hooks in React 16.8, useRef became a handy way to interact with refs, especially in functional components. However, as TypeScript has come to dominate the J...Sep 15, 2020·6 min read