❤️Learn, Share and Grow
💻Software Engineer | AWS Community Builder | Open Source Lover
☘️Passionate about Dev Experience Improvement
Jul 21, 2022 • 8 tweets • 5 min read
Learn JS Patterns - 1 Singleton
- harder to write unit test for app
- consider #Redux as a (kind of) singleton
- a bit breaks Single Responsibility Principle, because it solves two problems (keep one instance for a class, assign a global access point to the instance) @keurplkar@keurplkar Learn JS Patterns - 2 Proxy Pattern
- Proxy can help on validating, formatting, notification, debugging etc
- It add control over the behavior of an object, so over using Proxy may grant performance issue