TLDR
Singleton Pattern in ES6: The Good, The Bad, The Ugly. A singleton is a class that allows only a single instance of itself to be created and gives access to that created instance. It only instantiates a singleton once, and therefore any code that accesses the singleton will either create a new instance or modify that instance. Singletons are dangerously close to being a global variable, and we don't like those. Redux, vuex, singletons and globals all suck to varying degrees.via the TL;DR App
no story
Written by wagslane | Founder of Boot.dev.
Whining about coding sins since 2011. Committing coding sins for the same.