Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Imperative Apex
Imperative Apex is more flexible—and less restrictive—than reactive Apex wires. For example, you can use imperative Apex calls to change data on the server. The full details are described in Call Apex Methods Imperatively in the Lightning Web Components Developer Guide.
However, imperative Apex has a significant limitation in an offline-enabled mobile app. You can’t use imperative Apex while offline. This is by design, since imperative Apex is allowed to change data on the server. There’s no way to reconcile what might change on the server side with data cached on the client side. This is because the client has no knowledge of the implementation of a server-side Apex method. See Imperative Apex While Offline.