author

Frontend Dogma

Your hub to study, practice, and follow frontend development. Most recent publications only.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

(Is Frontend Dogma useful to you? Become a supporter on Open Collective or Patreon!)

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

(Is Frontend Dogma useful to you? Become a supporter on Open Collective or Patreon!)

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

(Is Frontend Dogma useful to you? Become a supporter on Open Collective or Patreon!)

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

Modern web development is increasingly incorporating micro-frontends. This architecture allows teams to deploy frontend components and can offer immense flexibility for large applications with multiple people working across different frameworks. However, state management in micro-frontends remains a challenge. To keep them modular and scalable, you must choose the right strategy for managing state in cross-framework environments.

Understanding the State Management Challenge in Micro-Frontends

State management is more complex than in monolithic applications. Each independently developed module needs to maintain a degree of isolation while still interacting with the shared state efficiently. Below are some of the key challenges developers face:

  • Performance issues: Managing state across multiple micro-frontends can introduce inefficiencies, especially when using heavy global stores. In fact, when asked about the top pain point in frontend development, 40% of tech professionals cited performance.

  • Data fragmentation: With each micro-frontend potentially storing and managing its own state, inconsistencies can arise. This leads to redundant API calls, outdated data, and synchronization issues. A significant 75% of organizations underutilize their data—often due to fragmented systems—so it is even more crucial to have a well-structured state management system.

  • Isolation vs. shared state: Developers build micro-frontends to be autonomous, yet they must share certain data across each one. Finding the right balance between encapsulation and shared state management is crucial.

  • Cross-framework compatibility: Since different teams may build micro-frontends using various technologies, ensuring seamless communication and state synchronization across frameworks can be challenging.

Strategies for Cross-Framework State Management

Managing state across micro-frontends requires a careful balance between performance, consistency, and scalability. The following approaches are the most effective strategies for cross-framework state management.

1. Shared Global Store

A shared global store involves using a centralized state management library like Redux or Recoil. This approach ensures that all micro-frontends access a single source of truth, reducing inconsistencies and improving state synchronization.

Pros

  • Ensures consistent and predictable state updates
  • Simplifies debugging and state tracking
  • Can optimize for performance with selective re-renders

Cons

  • Creates dependencies between micro-frontends, reducing modularity
  • Can introduce performance friction if improperly managed
  • Requires additional boilerplate code and configuration

This method works best when different micro-frontends need persistent application-wide, state-like authentication or global UI settings.

2. Custom Event-Based Communication

With event-driven communication, micro-frontends interact using browser events, an event bus, or a pub-sub system. This tactic keeps them loosely coupled while enabling different interactions.

Pros

  • Decouples state management, making micro-frontends more modular
  • Works across different frameworks
  • Lightweight with minimal setup

Cons

  • Difficulty managing multiple events over time
  • The challenge of debugging event flow
  • Potential risk of event collisions or unexpected behaviors

Event-driven state management is ideal for applications where micro-frontends do not need constant access to global state but must respond to real-time interactions.

3. Web Storage

For scenarios where state persistence is a must but full synchronization is not, localStorage and sessionStorage can be effective. These solutions allow micro-frontends to store and retrieve data without a centralized store.

Pros

  • Simple and does not require external libraries
  • Persistent data across page reloads
  • Works across different frameworks

Cons

  • Storage limits—localStorage caps at 5 MB, depending on the browser used
  • Does not support reactive updates like a global store

If you need to store session data, user preferences or cache API requests, web storage would be the best solution.

4. URL-Based State Management

You can encode state within the URL to maintain consistency between micro-frontends, ensuring that the state is shareable and navigable.

Pros

  • Enables seamless state sharing across micro-frontends
  • Works well with server-side rendering and static site generation
  • Does not require additional libraries

Cons

  • Not suitable for complex state structures
  • Limited storage capacity

This approach is useful for filtering, search parameters, pagination, and navigational state, where maintaining state across page reloads is essential.

5. WebSockets and Real-Time APIs

For applications that need live data updates, WebSockets allow micro-frontends to share state changes instantly.

Pros

  • Enables real-time interactions like chat and notifications

Cons

  • Requires backend support and additional infrastructure
  • Can introduce scalability challenges under high traffic

WebSockets is excellent for collaborative applications, stock trading dashboards, and chat-based platforms where stat changes must propagate instantly.

Choosing the Right State Management Strategy

Selecting the optimal state management approach depends on the complexity of the application, performance considerations, and the need for real-time synchronization. For instance, 7 in 10 consumers state that page speed influences their purchasing decisions, making performance a crucial factor when designing state-sharing mechanisms. If performance is a priority, lightweight event-based communications or a shared store may be preferable over heavy global state solutions.

Ultimately, hybrid approaches can often provide the best balance. Carefully evaluating the trade-offs of each method will help developers create a scalable, efficient, and maintainable micro-frontend architecture.

Crafting a Scalable State Management Strategy for Micro-Frontends

Managing state across micro-frontends may be challenging, but is a crucial part of building applications. The right state management strategy will depend on the application’s needs, team structure and performance requirements. Ultimately, optimizing your setup involves auditing your current architecture, experimenting with hybrid approaches and establishing clear communication protocols. By taking these steps, you can transform your micro-frontends into a well-oiled machine, empowering your teams to deliver exceptional user experiences.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

Since its launch in 2021, Frontend Dogma has supported Twitter/X for attributing authors and publishers.

Twitter/X was already a difficult platform at that point, but it was popular in the community.

With Elon Musk’s takeover of Twitter in 2022, everything got worse. X, the company, and X, the platform, began sending all the wrong signals, most of all contempt for various groups of people.

Frontend Dogma gradually reduced its support for Twitter/X to the point of making it “Twitter/X last.”

Today, Frontend Dogma is discontinuing all support for Twitter/X.

This means that if you're an author or publisher who is only active on Twitter/X, Frontend Dogma will no longer attribute you.

For a grace period, Frontend Dogma will retain metadata of authors and publishers who were previously only attributable on Twitter/X. If you’re an author or publisher whose work is featured on Frontend Dogma and who has recently started a presence on Mastodon or Bluesky, you can contact us to have your previous attributions updated and restored.

We ask everyone to take more responsibility, and to demand the same of our platforms. Leave the hate behind, and take more care of others.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

(Is Frontend Dogma useful to you? Become a supporter on Open Collective or Patreon!)

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

(Is Frontend Dogma useful to you? Become a supporter on Open Collective or Patreon!)

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

(Is Frontend Dogma useful to you? Become a supporter on Open Collective or Patreon!)

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

(Is Frontend Dogma useful to you? Become a supporter on Open Collective or Patreon!)

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

(Is Frontend Dogma useful to you? Become a supporter on Open Collective or Patreon!)

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

(Is Frontend Dogma useful to you? Become a supporter on Open Collective or Patreon!)

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

If you don’t know Frontend Dogma yet, then I guess you’re not a frontend or web developer 😉

Joking aside, Frontend Dogma has been a project I’ve built over the last three and a half years, which soon superseded and swallowed UITest.com, and currently features more than 600 web-based tools and links to more than 14,000 articles and videos (including some exclusives).

But where do I, who’s so far doing most of the work, get all these news and views?

Those sources I’d like to dedicate this brief post to, but before I do that, another note: I’m keeping my eyes peeled for anything related to frontend and web development, and for that reason alter my web dev news mix all the time, and generally love to browse your and other peers’ sites.

Then, “Operation 10K” (which kicked off closing a 2000s and 2010s coverage gap) is still in progress, and I’ve been working through dozens of websites of web dev magazines and select individuals to feature key material on Frontend Dogma. You can read up on this effort in my “2000s + 2010s” announcement.

Now, what sources, apart from sites from individual developers, have turned out to be staples in my daily web dev news diet?

The following ones, some of which I’m sure you already follow, others which you might want to follow, because while there’s some “cross-pollination,” some news you only find on the individual sites and newsletters:

Kudos and compliments to the passionate people diligently running all these sites 🥂

Again, then, this isn’t “everything.” For Frontend Dogma, I keep on scouting material, through all ages. That actually makes the archives increasingly valuable—browse (and follow) some of the topics to see what unique perspective they offer you.

If you have recommendations for sources I should follow, or articles or videos I should consider adding, reach out at any time. (Also, if you like to support this immense amount of free-time work, I do appreciate it. I’m not starving, but acknowledgment and support go some way.)

Happy frontend-developing, with Frontend Dogma!

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

(Is Frontend Dogma useful to you? Become a supporter on Open Collective or Patreon!)

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

A JavaScript closure (WebGlossary.info, MDN) is a function that retains access to its lexical scope even when the function is executed outside of that scope. Closures allow functions to “remember” the environment in which they were created.

It is important to understand some of their concepts:

  • Lexical scope: A function has access to variables from its own scope, its parent function’s scope, and the global scope.
  • Function inside a function: Closures are created when an inner function is returned or used outside its parent function.
  • Persistent state: Closures can “remember” variables even after the outer function has executed.

Closures sometimes come up in web developer interviews.

What are some questions that can be asked?

“What Is a Closure in JavaScript, and Why Is It Useful?”

A closure is a function that retains access to its lexical scope, even when executed outside of that scope. Closures allow functions to “remember” variables from their outer function, making them useful for data encapsulation, maintaining state, and function factories. For example, a counter function can retain a private count variable while allowing controlled access through an inner function. This makes closures essential for writing modular and reusable code in JavaScript.

“How Do Closures Help With Data Privacy? Provide an Example”

Closures help with data privacy by restricting access to variables, ensuring they cannot be modified from outside a function. This is particularly useful for encapsulation, similar to private variables in object-oriented programming.

function createCounter() {
  let count = 0; // Private variable
  return function () {
    count++;
    return count;
  };
}

const counter = createCounter();
console.log(counter()); // 1
console.log(counter()); // 2

Here, count is not accessible directly, but the returned function can increment and return its value, maintaining controlled access.

Logging I: “What Will Be Logged in the Following Code, and Why?”

function outer() {
  let count = 0;
  return function () {
    count++;
    console.log(count);
  };
}

const func1 = outer();
const func2 = outer();

func1(); // ?
func1(); // ?
func2(); // ?

The output will be:

1
2
1

Each call to outer() creates a new closure with a separate count variable. func1 and func2 do not share state because they are separate instances. The first two calls to func1() increment the first closure’s count, while func2() starts a fresh counter at 1. This demonstrates how closures create independent stateful functions.

Logging II: “What Will Be Logged in the Following Code, and in What Order?”

function makeRequest() {
  const requests = [];
  
  for (let i = 1; i <= 3; i++) {
    requests.push(() => new Promise(resolve => {
      setTimeout(() => {
        resolve(i * 2);
      }, 100 - i * 20);
    }));
  }

  return requests;
}

const requests = makeRequest();
Promise.all(requests.map(req => req())).then(console.log);

The output will be:

[2, 4, 6]

What makes this interesting:

  1. Each promise factory closes over its own i value thanks to let
  2. The timeouts are actually executed in reverse order (60ms, 40ms, 20ms)
  3. Despite different resolution times, Promise.all maintains the original array order
  4. The closure captures the multiplication operation, not just the value

In a question like this, what’s being tested is understanding of:

  1. Closure interaction with promises
  2. Promise.all behavior with array ordering
  3. setTimeout closure capturing
  4. Function factories with async operations

It’s a practical example showing how closures work with asynchronous code and promise composition.

“What Are Some Potential Pitfalls of Using Closures, and How Can They Be Avoided?”

There are at least three potential issues with closures:

  1. Memory leaks: If closures hold references to large objects, they can prevent those objects from being garbage collected, leading to an increased use of memory and risk of leaks.

  2. Unintended variable retention: Be mindful of the variables captured by closures. If not managed properly, closures can retain references to variables that are no longer needed (which can also lead to memory leaks). Release references when they are no longer necessary.

  3. Unexpected behavior in loops: Using var in loops can lead to unexpected results because var is function-scoped. It is best to use let or const within loops to ensure that each iteration captures the correct value, avoiding common pitfalls associated with closures.

—These are just a handful of many, many examples of how closures can be used in JavaScript, and what questions you could be asked. The key is to understand the concept and how it can be applied in different scenarios.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

(Is Frontend Dogma useful to you? Become a supporter on Open Collective or Patreon!)

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

(Is Frontend Dogma useful to you? Become a supporter on Open Collective or Patreon!)

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

(Is Frontend Dogma useful to you? Become a supporter on Open Collective or Patreon!)

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

(Is Frontend Dogma useful to you? Become a supporter on Open Collective or Patreon!)

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

(Is Frontend Dogma useful to you? Become a supporter on Open Collective or Patreon!)

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

(Is Frontend Dogma useful to you? Become a supporter on Open Collective or Patreon!)

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.

December 31, 1969  23:59:59

This is Frontend Dogma, your hub to study, practice, and follow frontend development.