Skip to content
tezvyn:

All bites

The whole library, newest first. Filter by what you are here for, or pick a topic if you already know.

8664 bites

Newest first

Vue, Angular & Svelte2 min read

Template syntax vs JSX: framework design trade-offs?

Templates (Vue, Angular) are declarative, easier to learn, enable static analysis; JSX (React, Solid) is code-based, flexible, familiar to JavaScript developers.

Vue, Angular & Svelte1 min read

Server-side data fetching in Nuxt 3?

Use useFetch or useAsyncData to fetch on server, data is serialized and injected into page state, component accesses it as reactive data.

Vue, Angular & Svelte2 min read

AOT vs JIT compilation: what does ahead-of-time win?

AOT compiles templates at build time (catches errors early, smaller bundle, faster startup), JIT compiles in browser (slower startup, larger bundle, flexible).

Vue, Angular & Svelte2 min read

Hydration: SSR HTML to interactive app?

Server renders HTML, client JavaScript bootstraps and attaches event listeners (hydration), mismatch occurs if server HTML differs from client render.

Vue, Angular & Svelte2 min read

Testing shared Vue components: unit, a11y, visuals?

Unit tests (Vitest/Jest) for logic, accessibility tests (axe, Pa11y) for ARIA/keyboard, visual regression (Percy, Chromatic) for rendering.

Vue, Angular & Svelte1 min read

Zone.js and change detection optimization in Angular?

Zone.js wraps async (timers, events, HTTP), triggering change detection after each; use runOutsideAngular when external libraries fire high-frequency events.

Vue, Angular & Svelte2 min read

When to adopt Pinia or NgRx over simple services?

Services work for small apps; use Pinia/NgRx when state is shared across many components, mutations are complex, or debugging/undo matters.

Vue, Angular & Svelte2 min read

Compiler vs runtime reactivity: Svelte, Vue, Angular?

Svelte compiles away reactivity (smaller bundles, zero-cost), Vue/Angular use runtime Proxies/zone.js (flexible but heavier).

Vue, Angular & Svelte2 min read

Compile-time vs runtime prop validation across frameworks?

TypeScript (compile-time) catches errors before build; Vue props validation (runtime) catches at runtime; tradeoff: TS is stricter, Vue validation is flexible but less safe.

Vue, Angular & Svelte1 min read

Content projection: slots vs props for composition?

Slots let parent pass markup (not data) to child, child renders it as-is, vs props pass values; slots excel when parent needs full layout control.

Vue, Angular & Svelte2 min read

Prerendering vs SSR in SvelteKit: trade-offs?

Prerender generates static HTML at build, SSR renders on each request, prerender wins on speed but requires static data.

UX Research2 min read

How to sync eye-tracking data with DOM events?

Record gaze points with millisecond precision, map to DOM via bounding box lookup, correlate with click events via shared timestamp.

UX Research1 min read

Making D3.js visualizations accessible to screen readers?

Dual-render strategy (viz + semantic table), ARIA live regions for dynamic updates, keyboard event handlers, focus management.

UX Research1 min read

How to diagnose and fix ignored sidebar navigation?

Form testable hypotheses (contrast, layout, blocking), propose specific CSS/DOM changes, sketch A/B test plan.

Node.js & Express1 min read

Multi-stage Docker builds for lean production images?

Build stage compiles/installs, runtime stage copies artifacts only, discards build tools.

Node.js & Express1 min read

Graceful shutdown implementation and zero-downtime deployments?

Listen for SIGTERM, stop accepting new connections, drain in-flight requests, close resources, exit.

Node.js & Express2 min read

PM2 cluster mode and multi-core utilization?

Cluster mode forks multiple worker processes using Node.js cluster module, distributes load, uses all CPU cores.

Node.js & Express1 min read

dependencies vs devDependencies in production?

Dependencies are needed at runtime, devDependencies only for development. npm install includes both, npm ci --only=production excludes dev.

Node.js & Express1 min read

What are key Dockerfile steps for Node.js Express apps?

Use lightweight base image, copy app, install deps, expose port, set NODE_ENV, run.

Node.js & Express1 min read

How does NODE_ENV=production change Express behavior?

NODE_ENV is a convention signal, production disables verbose logging and enables caching.