I know a bit about stateful and stateless web services but how does it work in salesforce lightning?

  • 2
    Did you do any research so far into the Salesforce docs? If you have, update your question and link any relevant links/blog posts that you've already read into Feb 27, 2020 at 9:08

1 Answer 1


From Salesforce documentation (https://www.salesforce.com/blog/2016/05/inside-lightning-components-the-fastest-way-to-build-apps.html):

The Lightning Component framework uses a stateful client and stateless server architecture that relies on JavaScript on the client side to manage UI component metadata and application data. The client calls the server only when necessary, and the server only sends data that is needed by the user to maximize efficiency. Using JSON to exchange data between the server and the client, the framework intelligently utilizes your server, browser, devices, and network so you can focus on the logic and interactions of your apps.

Stateless server - that's why @AuraEnabled actions should be defined as static method (not instance methods). They receive a request, process it, and return a response.

Not the answer you're looking for? Browse other questions tagged .