3 ms·
Because that singleton will serve multiple requests on the server, requests from different users. Singletons are more okay on the client because you know you'll
by billybolero 11y ago
Because that singleton will serve multiple requests on the server, requests from different users. Singletons are more okay on the client because you know you'll only serve one user, so the singleton can make that assumption as well. But that doesn't work on the server, since the singleton is serving more than one user.
You can still use singletons on the server, but you have to pass the current user id to every method/event on that singleton. And that ends up being quite annoying.
- tel 11y agoAh, I see. Thanks.