What is the difference between stateful and stateless service?
A stateful service is a service that can do different actions when being called multiple times, or depending on the order
the best example is AuthService, typically it will fetch the user details from the API on the first call to get it, and after that it will always return the same user (here different actions since first time it made HTTP call, second time it didn't), also if the user logged out it and you called to get the user details it won't call the user API but it will return null instantly so depending on if the user called logout or not it will have different response
a stateless service will always do the same action no matter how many times you called the method, and no matter what order of its methods you called
example for this is a the question service in this website, now no matter which component is calling it, no matter if the user is logged in or not it will always call the questions API with the provided question id, it can transform the response for example to match the UI model needed but it's still stateless because given the same ID it will always call the API and return the same model