# Local Storage is showing null on first load

**URL:** https://community.thunkable.com/t/local-storage-is-showing-null-on-first-load/76897
**Category:** Questions about Thunkable X
**Created:** [May 24, 2019, 12:11am UTC](https://community.thunkable.com/t/local-storage-is-showing-null-on-first-load/76897 "2019-05-24T00:11:28Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![itzvinie](https://avatars.discourse-cdn.com/v4/letter/i/eb9ed0/32.png) [@itzvinie](https://community.thunkable.com/u/itzvinie)
#### Post date: [May 24, 2019, 12:11am UTC](https://community.thunkable.com/t/local-storage-is-showing-null-on-first-load/76897/1 "2019-05-24T00:11:28Z")

</div>

Domhn-please help i keep getting null,whenever i try to login to my app-I used the Local storage component to save details for next login  
And the stored variable not working.  
I want users to have their details saved for next tine login into the app

---

<div class="post-metadata">

### Author: ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)
#### Post date: [May 24, 2019, 8:05am UTC](https://community.thunkable.com/t/local-storage-is-showing-null-on-first-load/76897/2 "2019-05-24T08:05:29Z")

</div>

Hi @itzvinie, is this a question about the sign in component?

---

<div class="post-metadata">

### Author: ![itzvinie](https://avatars.discourse-cdn.com/v4/letter/i/eb9ed0/32.png) [@itzvinie](https://community.thunkable.com/u/itzvinie)
#### Post date: [May 24, 2019, 8:06am UTC](https://community.thunkable.com/t/local-storage-is-showing-null-on-first-load/76897/3 "2019-05-24T08:06:48Z")

</div>

Yes it is

---

<div class="post-metadata">

### Author: ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)
#### Post date: [May 24, 2019, 10:19am UTC](https://community.thunkable.com/t/local-storage-is-showing-null-on-first-load/76897/4 "2019-05-24T10:19:15Z")

</div>

Ok, got it.

So just a couple of things for future reference - if you’re asking a new question, that’s not related to the original topic, then please create a new topic for it.

Also, mentioning individual users in your first post is considered bad etiquette in the community. This is a community not chat support. It should be open to anyone to reply and help out rather than singling out individual members.

> [@Do not notify users in 1st post](http://community.thunkable.com/t/do-not-notify-users-in-1st-post/1685):
>
> Please, do not notify users or groups in your first post of a topic or conversation (that post is what you have to write for creating a topic) It’s a waste of emails and notifications because we usually read every topic, so if we can help we will reply you; and also, you are forcing them indirectly to answer you even if they don’t know how to solve that problem, or making other’s reply less important if they haven’t been mentioned But you can notify someone in a reply he or she has already par…

FInally, it seems like you have a _very_ [similar post already](http://community.thunkable.com/t/firebase-label-showing-null/76475) - please use existing topics rather than posting elsewhere about the same issue.

Thanks!

---

<div class="post-metadata">

### Author: ![itzvinie](https://avatars.discourse-cdn.com/v4/letter/i/eb9ed0/32.png) [@itzvinie](https://community.thunkable.com/u/itzvinie)
#### Post date: [May 24, 2019, 12:47pm UTC](https://community.thunkable.com/t/local-storage-is-showing-null-on-first-load/76897/5 "2019-05-24T12:47:27Z")

</div>

My bad,am so sorry for that

Really Sorry

---

<div class="post-metadata">

### Author: ![DevilLooper](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/devillooper/32/53854_2.png) [@DevilLooper](https://community.thunkable.com/u/DevilLooper)
#### Post date: [December 6, 2019, 9:23am UTC](https://community.thunkable.com/t/local-storage-is-showing-null-on-first-load/76897/6 "2019-12-06T09:23:09Z")

</div>

same… mine concept is easy, in my app have a features **checking points balance** so in many merchant wallet, as first install, or users of course their balance is 0, but instead zero, null object… and **this blocks don’t work**  
 ![saa](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/a/6a7c67e1b3f27d25b836b0eb2c21a6f4af003fb1.png)

---

<div class="post-metadata">

### Author: ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)
#### Post date: [December 6, 2019, 12:12pm UTC](https://community.thunkable.com/t/local-storage-is-showing-null-on-first-load/76897/7 "2019-12-06T12:12:39Z")

</div>

Null in math functions converts to 0.

x \<- absolute \<- null

---

<div class="post-metadata">

### Author: ![DevilLooper](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/devillooper/32/53854_2.png) [@DevilLooper](https://community.thunkable.com/u/DevilLooper)
#### Post date: [December 6, 2019, 12:23pm UTC](https://community.thunkable.com/t/local-storage-is-showing-null-on-first-load/76897/8 "2019-12-06T12:23:11Z")

</div>

ops… i appreciate your help, but a visual guide of blocks of more text info can help me solve it

---

<div class="post-metadata">

### Author: ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)
#### Post date: [December 6, 2019, 8:50pm UTC](https://community.thunkable.com/t/local-storage-is-showing-null-on-first-load/76897/9 "2019-12-06T20:50:17Z")

</div>

Your code does not work for the reason that Local Storage returns a value that is not null. But what does it return? The string is “null”.

---

<div class="post-metadata">

### Author: ![DevilLooper](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/devillooper/32/53854_2.png) [@DevilLooper](https://community.thunkable.com/u/DevilLooper)
#### Post date: [December 7, 2019, 4:08am UTC](https://community.thunkable.com/t/local-storage-is-showing-null-on-first-load/76897/10 "2019-12-07T04:08:23Z")

</div>

can u please show me correct blocks? that show in a label if i call local storage that is not yet store anything for the first time.

---

<div class="post-metadata">

### Author: ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)
#### Post date: [December 7, 2019, 9:39am UTC](https://community.thunkable.com/t/local-storage-is-showing-null-on-first-load/76897/11 "2019-12-07T09:39:51Z")

</div>

![изображение](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/1/11a6b69d40d01a81e7ca137570efce07a008a959.png)

---

<div class="post-metadata">

### Author: ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)
#### Post date: [December 7, 2019, 11:35pm UTC](https://community.thunkable.com/t/local-storage-is-showing-null-on-first-load/76897/12 "2019-12-07T23:35:03Z")

</div>

There’s also a [null](https://docs.thunkable.com/logic#value-blocks) block that you could use instead of the “nul” string @actech?

---

<div class="post-metadata">

### Author: ![DevilLooper](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/devillooper/32/53854_2.png) [@DevilLooper](https://community.thunkable.com/u/DevilLooper)
#### Post date: [December 8, 2019, 4:30am UTC](https://community.thunkable.com/t/local-storage-is-showing-null-on-first-load/76897/13 "2019-12-08T04:30:25Z")

</div>

thats not working sir. Please do see my blocks at the top

---

<div class="post-metadata">

### Author: ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)
#### Post date: [December 8, 2019, 8:57am UTC](https://community.thunkable.com/t/local-storage-is-showing-null-on-first-load/76897/14 "2019-12-08T08:57:42Z")

</div>

@domhnallohanlon, the `value` parameter from the Local Storage Get block has a string type, and not a special null value, as many users think.

---

<div class="post-metadata">

### Author: ![DevilLooper](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/devillooper/32/53854_2.png) [@DevilLooper](https://community.thunkable.com/u/DevilLooper)
#### Post date: [December 8, 2019, 9:12am UTC](https://community.thunkable.com/t/local-storage-is-showing-null-on-first-load/76897/15 "2019-12-08T09:12:53Z")

</div>

this one is correct, it solve my problem to null issue @actech but returning to NaN when i saving a value to local storage

---

<div class="post-metadata">

### Author: ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)
#### Post date: [December 8, 2019, 9:55am UTC](https://community.thunkable.com/t/local-storage-is-showing-null-on-first-load/76897/16 "2019-12-08T09:55:25Z")

</div>

The NaN value appears when the result of the mathematical operation is not a number, for example, you are trying to add a string to a string.

---

<div class="post-metadata">

### Author: ![DevilLooper](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/devillooper/32/53854_2.png) [@DevilLooper](https://community.thunkable.com/u/DevilLooper)
#### Post date: [December 9, 2019, 5:11am UTC](https://community.thunkable.com/t/local-storage-is-showing-null-on-first-load/76897/17 "2019-12-09T05:11:42Z")

</div>

I agree @actech because got the error, what im trying to to is add a text to a value that may contain quotation marks (" ") like the value looks like “23”, and easy blocks to solve this, this is the only thing i need and finish my projects

 ![ff](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/1/a10a7e2aff73e346e6056f66ce93b63906d0af72.png)

---

<div class="post-metadata">

### Author: ![jane](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jane/32/27575_2.png) [@jane](https://community.thunkable.com/u/jane)
#### Post date: [December 10, 2019, 11:43am UTC](https://community.thunkable.com/t/local-storage-is-showing-null-on-first-load/76897/18 "2019-12-10T11:43:16Z")

</div>

Hi @DevilLooper,

[This app](https://x.thunkable.com/projectPage/5def7eb7177458c9bec2e1f4) might be helpful to you. It will take some text input and remove all characters that are not digits from 0-9, returning an integer.

For example, ‘thunkable1’ will be converted to ‘1’, ‘1thunkable2’ will be converted to ‘12’.  
To prove that this resulting integer can be parsed by the math blocks, the app will display 1) the number once other characters have been cleared and 2) the result of adding 1 to this number using math blocks.

If you want to facilitate decimal numbers, you can add a period character ‘.’ to the **listOfDigits** in the app. [This tutorial](http://community.thunkable.com/t/formatting-numbers-with-commas/68913) has advice on making sure that there is only one decimal point in your number (a number like 1.2.3 also cannot be parsed by the math blocks).

Jane

---

<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, 11:46am UTC](https://community.thunkable.com/t/local-storage-is-showing-null-on-first-load/76897/19 "2024-11-08T11:46:26Z")

</div>


