Learn how to use Dash Bio for next-gen sequencing & quality control. 🧬 Register for the Oct 27 webinar.

Proper way of passing two dcc.Store to one callback?

As per according to official docs, since you need to pass both the store and data of a dcc.Store to a callback for some code, I was trying to get a hold on passing two different dcc.Store, but it seems things get mix up, no matter the position of the arguments?

In my code, just suppose I have s header store and a body store. When using both of them in a single callback in order to update some other component, the stores get mix up: body info gets into header info, same for the data arguments. I think this is related to the position of the arguments inside the callback function.

So what’s the proper way of passing two different stores to a same callback?

Hi there,
It would be a lot easier to help you if you posted some code. Remember that data gets passed to dcc.Store in json format. The problem might be related to how you are passing data to dcc.Store and reading it back in. The python json library is really handy in this case.

1 Like