Snippet: 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 readhashnode.blainegarrett.com
TypeScript 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 readhashnode.blainegarrett.com
Accessing 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...1BSep 26, 2020 · 7 min readhashnode.blainegarrett.com
Euclidean 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...4BTMSep 18, 2020 · 9 min readhashnode.blainegarrett.com
HTML 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...2SESep 15, 2020 · 6 min readhashnode.blainegarrett.com