Kelseyi
View All Development

Latest Posts

img of Handle Dynamic Form with react-hook-form
Development

At work I was assigned a task to handle dynamic form elements with react-hook-form. The trickiest part is that the form could be deeply nested without a limitation on the total number of layers, and binding deeply nested fields to react-hook-form is a hard work, so I ended up adapting an approach that makes binding easier and formats the result on submit.

img of Prototypal Inheritance in JavaScript
Development

Most objects in JavaScript have an internal property called [[Prototype]], which stores a reference to another object. When a property is accessed and not found on the object itself, the JavaScript engine looks at its prototype, then the prototype's prototype, and so on until the property is found or the end of the prototype chain is reached. This mechanism is known as prototypal inheritance. It allows objects to inherit properties and methods from their prototypes. For example, built-in methods like .hasOwnProperty, .map, and .filter are available on objects because they are inherited from their prototypes, even though they are not explicitly declared on the objects themselves.

img of Optimizing Website Performance: Font
Development

Fonts are often large and take a while to load. Some browsers hide text until the intended font is downloaded, which could potentially delay First Contentful Print (FCP). Font swapping also poses potential layout shifts when the fallback font and the downlaoded font take up difference space, which affects Cumulative Layout Shift (CLS).