# Is there any way to call a data in dcc.store without calling it from a app.callback?

**URL:** <https://community.plotly.com/t/is-there-any-way-to-call-a-data-in-dcc-store-without-calling-it-from-a-app-callback/68557>\
**Category:** Dash Python\
**Tags:** question\
**Created:** [October 3, 2022, 11:33pm UTC](https://community.plotly.com/t/is-there-any-way-to-call-a-data-in-dcc-store-without-calling-it-from-a-app-callback/68557 "2022-10-03T23:33:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![topotaman](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/topotaman/32/22455_2.png) [@topotaman](https://community.plotly.com/u/topotaman)\
**Post date:** [October 3, 2022, 11:33pm UTC](https://community.plotly.com/t/is-there-any-way-to-call-a-data-in-dcc-store-without-calling-it-from-a-app-callback/68557/1 "2022-10-03T23:33:07Z")

</div>

hi  
I whant to use the data stored in dcc.store, to use it in the script without having to do a callback, is this possible?

---

<div class="post-metadata">

**Author:** ![jinnyzor](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jinnyzor/32/21194_2.png) [@jinnyzor](https://community.plotly.com/u/jinnyzor)\
**Post date:** [October 3, 2022, 11:42pm UTC](https://community.plotly.com/t/is-there-any-way-to-call-a-data-in-dcc-store-without-calling-it-from-a-app-callback/68557/2 "2022-10-03T23:42:45Z")

</div>

You want to use it on the JavaScript client side?

Are you planning on using it later in a callback?

---

<div class="post-metadata">

**Author:** ![topotaman](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/topotaman/32/22455_2.png) [@topotaman](https://community.plotly.com/u/topotaman)\
**Post date:** [October 3, 2022, 11:44pm UTC](https://community.plotly.com/t/is-there-any-way-to-call-a-data-in-dcc-store-without-calling-it-from-a-app-callback/68557/3 "2022-10-03T23:44:30Z")

</div>

I have not tried it yet … have other errors … but I think I might call it with a def using its id

---

<div class="post-metadata">

**Author:** ![jinnyzor](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jinnyzor/32/21194_2.png) [@jinnyzor](https://community.plotly.com/u/jinnyzor)\
**Post date:** [October 4, 2022, 12:03am UTC](https://community.plotly.com/t/is-there-any-way-to-call-a-data-in-dcc-store-without-calling-it-from-a-app-callback/68557/4 "2022-10-04T00:03:32Z")

</div>

Here are two ways that you can interact with localStorage without using the server callback.

The first is through a client\_side callback:

> **[Clientside Callbacks | Dash for Python Documentation | Plotly](https://dash.plotly.com/clientside-callbacks)**
>
> You might want to execute a callback in the frontend as opposed to the backend if you want to avoid the extra time that it takes to make a roundtrip to the server. Clientside callbacks allow you to write your callbacks in JavaScript that runs in the...

The second is through straight javascript:

```auto
data = JSON.parse(localStorage.getItem("data"))

localStorage.setItem("data", JSON.stringify(data))

```

Javascript updates will become out of sync with the server, which will case issues for callback’s down the line. However, if you only plan on pulling data, then you shouldnt encounter issues.

---

<div class="post-metadata">

**Author:** ![topotaman](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/topotaman/32/22455_2.png) [@topotaman](https://community.plotly.com/u/topotaman)\
**Post date:** [October 4, 2022, 12:28am UTC](https://community.plotly.com/t/is-there-any-way-to-call-a-data-in-dcc-store-without-calling-it-from-a-app-callback/68557/5 "2022-10-04T00:28:17Z")

</div>

hi, I’ve tried with js, and don’t know how to … can you make an example for python without a callback?
