Calling a component inside app.server.route

Hello everyone,

I want to call the “state” of the children property of a div-component within a function that is decorated with @app.server.route().

Is there a good way with the build-in dash functionalities? Or can I get the value using a flask method?

I don’t think this is directly possible as the flask.route() bypasses the Dash app completely.

One way to get around this is to put the state into query parameters. Each time your state changes then update the URL of your link/button e.g. “/?city=Sydney”. Then in the flask route you can use flask.request.args to get the value.

1 Like

Thank you for this solution. It works great with shorter query parameters.
However, the state that i’m looking to call is a list of up to 10,000 elements and I get a “Bad Request” error: Request Line is too large (8192 > 4094)

Is there a way to remove the request line length limitation somehow?

Request lines seem to have a max size limit of 4094 for most browsers. Would you have any other suggestions? (sorry for bump)