function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Josip Juric87Josip Juric87 

Stateful javascript in Lightning Components

In Lightning Components there are 3 possibilities for using javascript:
1) in the controller
2) in the helper
3) in a static resource.
3) is meant to be used for generic code, so if I want to write code specific for a component I should use 1) or 2). But 1) and 2) are both stateless, allowing only to store/retrieve state through aura-attributes, which seems to be not very convenient to list variables only used for state saving in the attributes. Is there any other way to store state in Lightning components?