Skip to content

Clean up MapboxToken subscriptions when DistanceRequest unmounts #24612

Closed

Description

@neil-marcellini

Problem

As described here, we aren't cleaning up our Onxy.connect subscriptions, App state listener, and timeout from the MapboxToken library when the DistanceRequest component un-mounts. That's a bit of a waste.

Solution

Clean up when the DistanceRequest component un-mounts.

Activity

  1. tgolen commented on Aug 17, 2023

    @tgolen
    Contributor

    PR is up for this: #25408

  2. tgolen commented on Aug 17, 2023

    @tgolen
    Contributor

    Depending on the order of how things get merged...

    If #24306 is merged first, then #25408 will need to be updated to tie into the unmount of the DistanceRequest component.

    If #25408 is merged first, then #24306 will need to be updated to use Mapbox.stop()

  3. added
    ImprovementItem broken or needs improvement.
    and removed on Aug 17, 2023
  4. hayata-suenaga commented on Aug 17, 2023

    @hayata-suenaga
    Contributor

    If #25408 is merged first, then #24306 will need to be updated to use Mapbox.stop()

    #25408 has been merged first. Updating my PR to use the stop method to cleanup listeners

  5. melvin-bot commented on Aug 25, 2023

    @melvin-bot

    @tgolen Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  6. tgolen commented on Aug 28, 2023

    @tgolen
    Contributor

    This is done and all deployed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

DailyKSv2ImprovementItem broken or needs improvement.ReviewingHas a PR in review

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions