---
title: "Discussion on \"JS Pro Design Patterns - The Singleton Pattern\" | Hashnode"
description: "Discussion on \"JS Pro Design Patterns - The Singleton Pattern\". The Singleton Pattern\nThis is one of the most common and useful JavaScript patterns. Basically, it is used to group code in a logical unit that can be accessed through only one access point, one variable. \nWe could make use of this technique when we ..."
url: "https://hashnode.com/posts/js-pro-design-patterns-the-singleton-pattern/605f9d0a5aa4944ee40f932e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [JS Pro Design Patterns - The Singleton Pattern](https://falbech.hashnode.dev/js-pro-design-patterns-the-singleton-pattern?utm_source=hashnode&utm_medium=feed)

The Singleton Pattern This is one of the most common and useful JavaScript patterns. Basically, it is used to group code in a logical unit that can be accessed through only one access point, one variable. We could make use of this technique when we ...

Mar 27, 2021 · 4 min read · falbech.hashnode.dev  
Updated Mar 30, 2021  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#design-patterns](https://hashnode.com/tag/design-patterns)
-   [#software-development](https://hashnode.com/tag/software-development)
-   [#best-practices](https://hashnode.com/tag/best-practices)

## Written by

[Felipe Martinez Albeche](https://hashnode.com/@falbech)

@falbech · Santa Catarina, BR

  
[View profile](https://hashnode.com/@falbech)

Software Developer

## Responses 1

Markdown supported · ⌘↵ to post

[Maxi Contieri](https://hashnode.com/@mcsee)

[Mar 27, 2021](https://hashnode.com/posts/js-pro-design-patterns-the-singleton-pattern/605f9d0a5aa4944ee40f932e/comment/605fc10438b0e14f092a2f09)

Nice article!

I think coupling is just the tip of the iceberg all the problem that brings this antipattern.

But i might be wrong

[Felipe Martinez Albeche](https://hashnode.com/@falbech)

[Apr 7, 2021](https://hashnode.com/posts/js-pro-design-patterns-the-singleton-pattern/605f9d0a5aa4944ee40f932e/comment/605fc10438b0e14f092a2f09#reply-606d1673b17dc439b747f9e1)

Thanks for your feedback, Maxi!

I agree that coupling is just a tiny part of a set of problems that might be brought about by this pattern. Despite the disadvantages, I still think there is scope for using this approach. Also, depending on the problem at hand there might be more suitable options that can be used instead.

[Maxi Contieri](https://hashnode.com/@mcsee)

[Apr 7, 2021](https://hashnode.com/posts/js-pro-design-patterns-the-singleton-pattern/605f9d0a5aa4944ee40f932e/comment/605fc10438b0e14f092a2f09#reply-606da52b9deb56667e37e6ca)

[Felipe Martinez Albeche](https://hashnode.com/@falbech) if you are curious enough.

Here are 18 reasons to avoid this anti-pattern

[maximilianocontieri.com/singleton-the-root-of-all…](https://maximilianocontieri.com/singleton-the-root-of-all-evil)
