How to reload the dash figure whenever url change?

I developed a Flask webpage that contains Dash as a component. I want to know how to change the figure of Dash according to the parameter passed by the URL. For example, when I click a link and jump to the page containing Dash, the URL passes a string like ‘ABC’, how to show it in Dash.

The following code shows how I create a Flask app that contains Dash.

def init_app():
  app = Flask(__name__, instance_relative_config=False)

  with app.app_context():
    from . import route
    import run_dash # this method will return a dash app that server is Flask app
    app = run_dash(app)

  return app