Timeline for Preserve a JavaScript variable between component calls of the client-side code
Current License: CC BY-SA 4.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 2, 2018 at 19:18 | vote | accept | iloveseven | ||
Aug 2, 2018 at 19:14 | answer | added | sfdcfox♦ | timeline score: 5 | |
Aug 2, 2018 at 19:13 | comment | added | Lightning Evangelist | Agree with David. Lightning is stateful on the client side, so why can't you assign that JS variable to an aura:attribute and use it whenever needed? That value is preserved as long as the component is not destroyed/refreshed. | |
Aug 2, 2018 at 19:03 | comment | added | David Reed | This sounds like it would just be a private attribute of the component. Am I misunderstanding? | |
Aug 2, 2018 at 18:56 | history | asked | iloveseven | CC BY-SA 4.0 |