# Difference in sharing data between callbacks with hidden divs and dcc.Store?

**URL:** <https://community.plotly.com/t/difference-in-sharing-data-between-callbacks-with-hidden-divs-and-dcc-store/31448>\
**Category:** Dash Python\
**Created:** [November 17, 2019, 1:46pm UTC](https://community.plotly.com/t/difference-in-sharing-data-between-callbacks-with-hidden-divs-and-dcc-store/31448 "2019-11-17T13:46:26Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![alexcjohnson](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/alexcjohnson/32/614_2.png) [@alexcjohnson](https://community.plotly.com/u/alexcjohnson)\
**Post date:** [November 19, 2019, 2:22am UTC](https://community.plotly.com/t/difference-in-sharing-data-between-callbacks-with-hidden-divs-and-dcc-store/31448/2 "2019-11-19T02:22:06Z")

</div>

short answer: use `dcc.Store`

longer answer: hidden divs was a workaround before we created `dcc.Store`. They require adding the data to the DOM (which has some overhead even if the div is not displayed), and they can only store data that’s valid as the `children` prop - in principle, just strings or arrays of strings. `dcc.Store` has no DOM overhead, can store arbitrary JSON, and can also use `localStorage` or `sessionStorage` to persist across redraws.

---

_[View the full topic](https://community.plotly.com/t/difference-in-sharing-data-between-callbacks-with-hidden-divs-and-dcc-store/31448)._
