by nailer · 11y ago · 0 comments
I use closures to hold state all the time in node, I still don't understand why state in a closure is better than state in an object.
If someone could explain this I'd be grateful: articles like this just seem to say 'state is bad' and ignore that it still exists in functional scopes.