# Local storage vs list in variable

**URL:** <https://community.thunkable.com/t/local-storage-vs-list-in-variable/1139880>\
**Category:** Questions about Thunkable X\
**Created:** [March 3, 2021, 1:53pm UTC](https://community.thunkable.com/t/local-storage-vs-list-in-variable/1139880 "2021-03-03T13:53:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Balanced\_Kitchen](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@Balanced\_Kitchen](https://community.thunkable.com/u/Balanced_Kitchen)\
**Post date:** [March 3, 2021, 1:53pm UTC](https://community.thunkable.com/t/local-storage-vs-list-in-variable/1139880/1 "2021-03-03T13:53:34Z")

</div>

Hi, the title is strange, but the situation is as follows. I have an application in which I store a little over 20 variables. I wondered how it was better to do it. I tested two options:

1. I create a list of data in one variable and each time I call information from the list.
2. I save all the data in the local storage and then call them from there.  
Both methods work equally fast. I am currently opting for option 1 because it requires fewer blocks.  
In your opinion, which method is correct and which do you prefer?

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [March 3, 2021, 4:07pm UTC](https://community.thunkable.com/t/local-storage-vs-list-in-variable/1139880/2 "2021-03-03T16:07:38Z")

</div>

From experience using long long list can be problematic in the coding side but works out in the long run.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [March 3, 2021, 5:42pm UTC](https://community.thunkable.com/t/local-storage-vs-list-in-variable/1139880/3 "2021-03-03T17:42:31Z")

</div>

I would opt for a stored variable of type object.

With lists, you will have to remember the order of variable and where they are used for.

In the other hand an object is a set of pairs with key:value which makes retrieving it easier and revisiting the code after sometime more obvious.

---

<div class="post-metadata">

**Author:** ![Balanced\_Kitchen](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@Balanced\_Kitchen](https://community.thunkable.com/u/Balanced_Kitchen)\
**Post date:** [March 4, 2021, 6:42am UTC](https://community.thunkable.com/t/local-storage-vs-list-in-variable/1139880/4 "2021-03-04T06:42:26Z")

</div>

I hadn’t thought about using an object. Really long lists are difficult to maintain :).

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [March 17, 2021, 4:37pm UTC](https://community.thunkable.com/t/local-storage-vs-list-in-variable/1139880/5 "2021-03-17T16:37:19Z")

</div>

I strongly suggest this method. I have a big ass app with a ton of lists. Some lists have 50 slots… that takes a lot of time to deal with that. An object with key:value pairs is the way to go

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:29pm UTC](https://community.thunkable.com/t/local-storage-vs-list-in-variable/1139880/6 "2024-11-08T13:29:04Z")

</div>


