You need to sign in to do that
Don't have an account?
Josip 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?
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?