Can you access dcc.Store from within an @server.route callback?

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!

Since the store ‘lives’ in the browser, i.e. clientside, while the post request is invoked serverside, i don’t see how that should be possible.

I would say that you need to store the data somewhere else where both client and server can access it, e.g. in a serverside cache.