Working around async hydration issues in Astro and Safari
Amadeus Maximilian’s Blog
A short post on fixing cryptic JavaScript errors in Safari caused by trying to hydrate components dealing with top-level await simultaneously in Astro.
Amadeus Maximilian’s Blog
A short post on fixing cryptic JavaScript errors in Safari caused by trying to hydrate components dealing with top-level await simultaneously in Astro.
Alexander Opalic
This is the written-up version of the talk I gave at Vue MAD 2026 in Madrid: Clean Code Is Sexy Again. Making Your Vue Project AI-Ready. If you would rather watch it, here is the original recording on YouTube. Otherwise, read on. TLDR My main take: what is good for developers is also good for...
Alexander Opalic
Table of Contents TLDR A Dialog is a great test case for compound components because every product needs three or four versions of one: confirm, edit, share, settings. The naive paths both fail: copy a monolithic dialog into every variant and the shells drift; collapse them into one god component...
Alexander Opalic
TLDR Build a real-time, offline-capable todo app with Jazz and Vue 3. Jazz replaces your entire backend with collaborative data structures called CoValues. Combined with community-jazz-vue, you get composables like useCoState that plug into Vue’s reactivity system. The app syncs across tabs and...
Alexander Opalic
Over the last 7+ years as a Vue developer, I’ve developed a highly opinionated style for writing Vue components. Some of these rules might not be useful for you, but I thought it was worth sharing so you can pick what fits your project. The goal is to enforce code structure that’s readable for...
Alexander Opalic
Quick Summary This post covers a practical testing approach for Vue 3 applications: Composable unit tests for fast logic verification Integration tests with Vitest browser mode for realistic user flows Accessibility and visual tests for critical screen checks Simplified data factories to manage...
Alexander Opalic
I was studying VueUse’s codebase to understand how they structure their composables. VueUse has become the de facto standard library for Vue utilities, and I wanted to understand the patterns that make their composables so reliable. After diving deep into their source code, I distilled the key...
Alexander Opalic
I rely on Claude Code, but it has a structural limitation: it defaults to implementation-first. It writes the “Happy Path,” ignoring edge cases. When I try to force TDD in a single context window, the implementation “bleeds” into the test logic (context pollution). This article documents a...
I'm Mary Poppins, y'all!
What's new in Kickstart 1.1.0
Alexander Opalic
I once worked on a project that wanted to build an e-commerce website with Nuxt that could be used by multiple countries. The architecture was a nightmare: they had a base repository, and then they would merge the base repo into country-specific code. This was before Nuxt Layers existed, back in...
Alexander Opalic
If your goal is to cache backend results or manage server state, Pinia is not the right tool. Libraries such as [pinia-colada](https://pinia-colada.esm.dev/), [TanStack Vue Query](https://tanstack.com/query/vue), or [RStore](https://rstore.dev/) are designed for this purpose. They provide built-in...
Alexander Opalic
The Problem: Pinia Gives You Freedom, Not Rules Pinia is a fantastic state management library for Vue, but it doesn’t enforce any architectural patterns. It gives you complete freedom to structure your stores however you want. This flexibility is powerful, but it comes with a hidden cost: without...
Alexander Opalic
Monorepo with `pnpm`. Vue 3 SPA. Client side composition with Module Federation. Host owns routing. Events for navigation. Cart sync through localStorage plus events. Shared UI library for consistency. Fallbacks for remote failures. Code:...
Alexander Opalic
I am a big fan of VueUse. Every time I browse the docs I discover a new utility that saves me hours of work. Yet VueUse does more than offer nice functions. It also keeps your code safe when you mix client-side JavaScript with server-side rendering (SSR). In this post I show the typical “window is...
Alexander Opalic
graph TD A["❌ Traditional Approach"] --> A1["Monolithic Queries"] A1 --> A2["Over-fetching"] A1 --> A3["Tight Coupling"] A1 --> A4["Implicit Dependencies"] B["✅ Fragment Masking"] --> B1["Component-Owned Data"] B1 --> B2["Type Safety"] B1 -->...
Alexander Opalic
Why plain TypeScript isn’t enough If you hover over the result from useQuery in last week’s code, you’ll still see Ref<any>. That means: <li v-for="c in result?.countries2" :key="c.code"></li> …slips right past TypeScript. It’s time to bring in GraphQL Code Generator which...
Alexander Opalic
Introduction For over a year now, I’ve been working with GraphQL and a Backend-for-Frontend (BFF) at my job. Before this role, I had only worked with REST APIs and Axios, so it’s been a big learning curve. That’s why I want to share everything I’ve learned over the past months with you. I’ll...
Alexander Opalic
TL;DR White box testing peeks into Vue internals, making your tests brittle. Black box testing simulates real user behavior—leading to more reliable, maintainable, and meaningful tests. Focus on behavior, not implementation. Introduction Testing Vue components isn’t about pleasing SonarQube or...
Alexander Opalic
TLDR Improve your Vue component performance and readability by applying the Computed Inlining pattern - a technique inspired by Martin Fowler’s Inline Function pattern. By consolidating helper functions directly into computed properties, you can reduce unnecessary abstractions and function calls,...
Alexander Opalic
TLDR Group related logic in your Vue components into well-named functions inside <script setup>. The technique adapts Martin Fowler’s Extract Function pattern to keep components readable without splitting them into separate files. Introduction The Composition API and <script setup>...
Alexander Opalic
TL;DR: Visual regression testing detects unintended UI changes by comparing screenshots. With Vitest’s experimental browser mode and Playwright, you can: Run tests in a real browser environment Define component stories for different states Capture screenshots and compare them with baseline images...
Alexander Opalic
TLDR This guide shows you how to test Vue Router components using real router integration and isolated component testing with mocks. You’ll learn to verify router-link interactions, programmatic navigation, and navigation guard handling. Introduction Modern Vue applications need thorough testing...
Alexander Opalic
TLDR Create a Pinia plugin that enables state synchronization across browser tabs using the BroadcastChannel API. The plugin allows you to mark specific stores for cross-tab syncing and handles state updates automatically with timestamp-based conflict resolution. Introduction In modern web...
Alexander Opalic
Introduction Most AI translation tools rely on external APIs. This means sending data to servers and paying for each request. But what if you could run translations directly in your browser? This guide shows you how to build a free, offline translator that handles 200 languages using Vue and...
Alexander Opalic
TL;DR: Prop Drilling Solutions at a Glance Global state: Pinia (Vue’s official state management) Reusable logic: Composables Component subtree sharing: Provide/Inject Avoid: Event buses for state management Click the toggle button to see interactive diagram animations that demonstrate each...
Alexander Opalic
Ever been frustrated when your web app stops working because the internet connection dropped? That’s where local-first applications come in! In this guide, we’ll explore how to build robust, offline-capable apps using Vue 3 and Dexie.js. If you’re new to local-first development, check out my...
Alexander Opalic
Building Vue components that handle multiple variations while maintaining type safety can be tricky. Let’s dive into the Variant Props Pattern (VPP) - a powerful approach that uses TypeScript’s discriminated unions with Vue’s composition API to create truly type-safe component variants. TL;DR The...
Alexander Opalic
TLDR Set up SQLite WASM in a Vue 3 application for offline data storage Learn how to use Origin Private File System (OPFS) for persistent storage Build a SQLite query playground with Vue composables Implement production-ready offline-first architecture Compare SQLite vs IndexedDB for web...
Alexander Opalic
Table of Contents Introduction Progressive Web Apps (PWAs) have revolutionized our thoughts on web applications. PWAs offer a fast, reliable, and engaging user experience by combining the best web and mobile apps. They work offline, can be installed on devices, and provide a native app-like...
Alexander Opalic
Introduction Clear writing requires clear thinking. The same is valid for coding. Throwing all components into one folder may work when starting a personal project. But as projects grow, especially with larger teams, this approach leads to problems: Duplicated code Oversized, multipurpose...
Alexander Opalic
Introduction My team and I discussed Vue 3.5’s new features, focusing on the onWatcherCleanup function. The insights proved valuable enough to share in this blog post. The Side Effect Challenge in Vue Managing side effects in Vue presents challenges when dealing with: API calls Timer operations...
Alexander Opalic
Introduction Understanding the core of modern Frontend frameworks is crucial for every web developer. Vue, known for its reactivity system, offers a seamless way to update the DOM based on state changes. But have you ever wondered how it works under the hood? In this tutorial, we’ll demystify...
Alexander Opalic
Imagine having complete control over your data in every web app, from social media platforms to productivity tools. Picture using these apps offline with automatic synchronization when you’re back online. This is the essence of local-first web development – a revolutionary approach that puts users...
Alexander Opalic
Creating accessible Vue components is crucial for building inclusive web applications that work for everyone, including people with disabilities. This guide outlines 8 essential steps to improve the accessibility of your Vue projects and align them with Web Content Accessibility Guidelines (WCAG)...
Alexander Opalic
Quick Summary This post covers specific Vue project structures suited for different project sizes: Flat structure for small projects Atomic Design for scalable applications Modular approach for larger projects Feature Sliced Design for complex applications Micro frontends for enterprise-level...
Alexander Opalic
Introduction When developing apps, there’s often a need to store data. Consider a simple scenario where your application features a dark mode, and users want to save their preferred setting. Most users might prefer dark mode, but some will want light mode. This raises the question: where should we...
Alexander Opalic
Table of Contents Introduction Writing code that’s both easy to test and easy to read can be a challenge, with Vue components. In this blog post, I’m going to share a design idea that will make your Vue components better. This method won’t speed up your code, but it will make it simpler to test...
Alexander Opalic
Introduction Hello, everyone; in this blog post, I want to help you better understand how to test a composable in Vue. Nowadays, much of our business logic or UI logic is often encapsulated in composables, so I think it’s important to understand how to test them. Definitions Before discussing the...
Alexander Opalic
Introduction The release of Vue 3 brought a transformational change, moving from the Options API to the Composition API. At the heart of this transition lies the concept of “composables” — modular functions that leverage Vue’s reactive features. This change enhanced the framework’s flexibility and...
Alexander Opalic
Introduction Navigating the complex world of composables presented a significant challenge. Understanding this powerful paradigm required effort when determining the division of responsibilities between a composable and its consuming component. The strategy for error handling emerged as a critical...
Alexander Opalic
Accessibility is a critical aspect of web development that ensures your application serves everyone, including people with disabilities. Making your Vue apps accessible fulfills legal requirements and enhances the experience for all users. In this post, we’ll explore how to improve accessibility...
Adrian Mejia Blog
In this tutorial, you are going to learn the basics of Vue.js. While we learn, we are going to build a Todo app that will help us to put in practice what we learn. A good way to learn a new framework, It’s by doing a Todo app. It’s an excellent way to compare framework features. It’s quick to...