dccStore

The dccStore component is used to store JSON data in the browser.

For more information and examples, refer to Part 4 of the Dash tutorial on Sharing Data Between Callbacks.

Examples

Share Data Between Callbacks

This example has not been ported to R yet - showing the Python version instead.

Visit the old docs site for R at: https://community.plotly.com/c/dash/r/21

Store Clicks

This example has not been ported to R yet - showing the Python version instead.

Visit the old docs site for R at: https://community.plotly.com/c/dash/r/21

Retrieving the Initial Store Data

If you use the data prop as an output, you cannot get the
initial data on load with the data prop. To counter this,
you can use the modified_timestamp as Input and the data as State.

Storage Limitations


Store Properties

Our recommended IDE for writing Dash apps is Dash Enterprise’s
Data Science Workspaces,
which has typeahead support for Dash Component Properties.
Find out if your company is using
Dash Enterprise
.

id (character; required):
The ID of this component, used to identify dash components in
callbacks. The ID needs to be unique across all of the components in
an app.

storage_type (a value equal to: ‘local’, ‘session’ or ‘memory’; default 'memory'):
The type of the web storage. memory: only kept in memory, reset on
page refresh. local: window.localStorage, data is kept after the
browser quit. session: window.sessionStorage, data is cleared once the
browser quit.

data (named list | unnamed list | numeric | character | logical; optional):
The stored data for the id.

clear_data (logical; default FALSE):
Set to TRUE to remove the data contained in data_key.

modified_timestamp (numeric; default -1):
The last time the storage was modified.