Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
Update the current state using AppRouteConfig to update
the path, previewMode and queryParams fields. Since these fields
can be manipulated from the router's query parameters, as opposed to the
rest of fields that stay unchanged during runtime.