--

The problem with Singletons is you can't replace them to test *other* things that are hooked into them. Which is closely related to the problem where everything is reaching out and changing things, because everything has a direct reference to the object.

--

--

Amy Blankenship
Amy Blankenship

Written by Amy Blankenship

Full Stack developer at fintech company. I mainly write about React, Javascript, Typescript, and testing.

Responses (1)