Skip to content
tezvyn:

🌐Frontend Dev

Frontend web development and UI engineering

588 bites

Test yourself: Top 30 Frontend Dev concepts questionsMultiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.

Concepts in Frontend Dev, page 14

advanced2 min read

SSR State Hydration: Syncing Server and Client State

SSR hydration syncs server and client state to prevent UI errors. The server renders the page with initial data, then sends that data to the client to "hydrate" its own state store. The footgun is using a global store on the server, which leaks data.

CSS Cascade Layers: Control Your Cascade
advanced2 min read

CSS Cascade Layers: Control Your Cascade

Cascade Layers are explicit buckets for your CSS, letting you control which styles win without fighting specificity. Use them to predictably layer resets, component libraries, and utilities.

Runtime Response Validation with Schema Libraries
advanced2 min read

Runtime Response Validation with Schema Libraries

TypeScript types evaporate at runtime, so a fetch response typed as User[] can be null or malformed. Schema libraries like Zod give static types and runtime guards from one contract. The footgun is using as instead of parse, silently reintroducing crashes.

Optimistic UI: Assume Success for a Faster Feel
advanced2 min read

Optimistic UI: Assume Success for a Faster Feel

An optimistic UI assumes an action will succeed, updating the interface instantly instead of waiting for the server. This makes actions like liking a post or adding to a cart feel instant. The footgun is failing to revert the UI when the server reports an.

advanced2 min read

RTK Query: Your Redux Data Fetching Layer

RTK Query treats server data as a cache, not global state, handling fetching and loading states for you. Use it to replace manual fetch logic and keep data fresh across components. Forgetting to call setupListeners disables automatic refetching.

easy2 min read

Sass Variables: Compile-Time Constants for CSS

Think of Sass variables as compile-time constants for your styles. You define a value once (e.g., $brand-color) and reuse it, ensuring consistency. They're perfect for theming colors and fonts.

XState: Predictable UI State with State Machines
advanced2 min read

XState: Predictable UI State with State Machines

XState treats UI logic as a formal state machine, making impossible states impossible. It's ideal for complex components like multi-step forms or data fetching UIs. The footgun is overusing it for simple boolean toggles, which adds needless boilerplate.

Stream a Fetch Response Chunk by Chunk
advanced2 min read

Stream a Fetch Response Chunk by Chunk

Process a fetch response as it arrives, chunk by chunk, instead of buffering the whole file in memory. This is ideal for large files like videos or giant JSON datasets.

Test Like a User: The React Testing Library Philosophy
easy2 min read

Test Like a User: The React Testing Library Philosophy

React Testing Library's philosophy is to test components the way a user interacts with them, not by their internal implementation. This ensures refactors don't break tests. The footgun is querying by implementation details instead of what a user actually sees.

easy2 min read

Sass Nesting: Write CSS That Mirrors Your HTML

Sass nesting lets you structure your styles like your HTML, avoiding repetitive selectors. Use it for components with clear parent-child relationships, like a navbar's list items. The footgun is over-nesting, which creates bloated, overly-specific CSS.

SSR Hydration: Don't Re-render, Reuse
advanced2 min read

SSR Hydration: Don't Re-render, Reuse

Hydration tells your client-side app to reuse the HTML sent by the server instead of wastefully re-rendering it. This prevents UI flicker in Server-Side Rendered apps and improves load performance.

Jest: The 'Batteries-Included' JavaScript Test Runner
easy2 min read

Jest: The 'Batteries-Included' JavaScript Test Runner

Jest is a "batteries-included" JavaScript testing framework, bundling a runner, assertions, and mocking tools. It's a default for React apps but works for any JS project. The footgun is thinking it's only for React; it's a general-purpose tool.

CSS Minification: Smaller Files, Faster Sites
easy1 min read

CSS Minification: Smaller Files, Faster Sites

CSS minification vacuum-packs your stylesheets, removing whitespace, comments, and unused code to shrink file size. This automated build step improves performance by reducing network transfer size.

easy2 min read

Client-Side Routing: No More Full Page Reloads

Client-side routing fakes page navigation. Instead of fetching new HTML from a server, it just shows or hides components already loaded, making transitions feel instant. This powers single-page apps (SPAs).

easy2 min read

React Testing Library Queries: Find Elements Like a User

React Testing Library queries find elements by simulating how users see your UI, not by implementation details. Prioritize user-facing attributes like getByRole or getByLabelText.

easy2 min read

Autoprefixer: Stop Memorizing CSS Vendor Prefixes

Autoprefixer lets you write modern CSS and automatically adds vendor prefixes like -webkit- during your build. It's a standard part of frontend toolchains, ensuring styles work across browsers.

RouterLink: Client-Side Navigation in Angular
easy2 min read

RouterLink: Client-Side Navigation in Angular

RouterLink is Angular's replacement for <a> tags, preventing full page reloads in a Single-Page App. Use it on any element to navigate between views. The common footgun is using a standard <a href="...">, which reloads the page and loses application state.

Jest Matchers: Asserting Values in Your Tests
easy2 min read

Jest Matchers: Asserting Values in Your Tests

Jest matchers are assertion functions that check if a value meets a condition. You use them with expect() to verify function outputs, object properties, or promise states.

intermediate2 min read

Sass Mixins: Reusable Style Functions

Think of a Sass mixin as a function for CSS. It bundles style declarations you can reuse, avoiding repetitive code. Use it for common patterns like button styles or clearing floats. The footgun: mixins copy code everywhere, which can bloat your final CSS.

easy2 min read

Programmatic Navigation: Changing Routes with Code

Instead of a user clicking a link, you trigger navigation from your JavaScript. This is useful for redirecting after an action, like a successful login. The main footgun: params are ignored if you also provide a path—use a named route instead.

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles