Exposing Lit Element Attribute and Properties for Outside Use

Problem Building a Lit Element component, and defining their properties for internal consumption is very well explained. However, in this article we are interested more with how to define the interface between our lit element and its consumer. In other words, we want to examine how to set lit element attributes and properties from outside of the component, and use these in the component. We also want to understand some of the intricacies and quirks associated with this process....

February 24, 2024 · Joel Tok

Vanilla Web Components from Scratch – A Dive

Introduction In this article we aim to develop a fundamental understanding of what Web Components are, by methodically and comprehensively building and modifying our own standalone Web Component through a variety of patterns. Let’s jump right in. The Component – A Terrapin Card To start off, let’s build our first Web Component and render it with an html file. I like pets, and I used to keep terrapins, so let’s use that as an example....

February 22, 2024 · Joel Tok

React Hook Form – Blur on submit

Problem I’ve been working with the deliciously productive React Hooks API recently, and have been using React Hook Form as my go to form abstraction. There was one issue I faced lately however that bothered the heck out of me: When the user hits enter on the keyboard, for some mysterious reason I was not able to get the input to blur. Even if there was no validation errors, and the data was successfully saved, the input just....

July 19, 2022 · Joel Tok