When to use the id attributeThe id attribute is arguably one of the most popular attributes used in HTML, second only to the class attribute. It serves a lot of purposes, which means it can easily be misunderstood or misused. Let's take a look at what it's really for, what it's...8 min read·webdev.tipsFeb 15, 2023
What state should be stored in the URLThe URL can be a powerful tool for sharing and managing the state of an app, but it's often overlooked or misunderstood. When properly done, the typical CRUD app with read/write/edit/delete functionality doesn't need much more state management than t...5 min read·webdev.tipsFeb 14, 2023
How to sort arrays reliably in TypeScriptWhy you should never rely on the default sort4 min read·webdev.tipsFeb 13, 2023
How to render a form with an external submit buttonThere should be at least two ways for any user to submit a form. Pointer users should be able to press a submit button, and keyboard users should be able to press the enter key. Both of these UX behaviors are provided natively by the browser, given a...2 min read·webdev.tipsFeb 9, 2023
Styling using data attributesThe vast majority of design systems and component libraries organize their styles using class selectors. Generally, this is a good choice, but it's not perfect. Methodologies like BEM are used as a way to organize these classes into component and mod...3 min read·webdev.tipsFeb 8, 2023