I have been creating projects with Dash. Now, it is connected to another existing ReactJS App.
What I want to know is after defining an API endpoint in the dash app, one that receives POST request, I want to access the app’s dcc.Store component within the route’s callback. The dcc.Store component is already defined.
So, pseudo-code is something like:
@server.route('/projectUUID', methods=['POST'])
def get_projectData(projectUUID):
# do some calculations here
result = calculation output
# Save the result to a dcc.Store component with id=projectDataState
# This is the part I don't know. How do I access the dcc.Store from within this route callback?
return jsonify({
'message': 'Project data is stored in session successfully!'
}), 200
TYIA for the help!