frontend posts

Toasts Are Harder Than They Look

Accessibility problems usually have recognizable solutions. A button needs an accessible name, text needs sufficient contrast, and a modal needs sensible focus management.

frontendaccessibility

Why view models?

When writing React code, we often need to pull data from an API and manipulate that data to better match how we want to present it. Now that React hooks are ubiquitous, I have seen a lot of that data manipulation move into hooks that get re-used in multiple components.

typescriptreactarchitecturefrontend

Enforcing Localization through Types

When building web applications, enforcing that strings be localized to the user's preferred language can sometimes be achieved via lint rules. But what if we could enforce proper localization using types in TypeScript?

typescriptreactfrontend

Feature Contexts

A common pattern in larger application when trying to track feature usage is to try to namespace events. For example, you might have a button that you want to track clicks on. For the sake of this article, we will use the data-track attribute on elements to track their usage, but you can imagine this works with any tracking implementation where you may need to explicitly call a tracking function (e.g. track(namespace)).

typescriptreactfrontend

Reviewing Your Frontend Applications

Below are some notes I’ve taken from setting up new code repositories and onboarding new team members. Hopefully they can help improve your current documentation and notes to make onboarding a smooth process.

frontendprogramming

Component Library Checklist

The following is a checklist I like to use to ensure I'm covering all the bases when building a component library. It's a work in progress, but I hope it can be useful to others.

design-systemsfrontendprogramming

Backend for Frontend

The Backend for the Frontend (BEFFE) is typically stateless and acts as a proxy for other services, including authentication, authorization, and core services. The recent divorce of browser code being rendered by backend services was created by SPAs - Single Page Applications. In simpler architectures, a SPA and service could be as simple as:

architecturefrontend

NX NextJS Starter

To kickstart the year, I created a repo that contains a simple starter kit for using NextJS with NX. You can see the repo here:

typescriptfrontend

User Interface

This post was originally on a blog I started for creating web applications. This post goes into User Interface design for web applications.

frontend