JS console error when closing Feature Tour.
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 383
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 80
Description
## Bug Description
When closing a Feature Tour, the following error is displayed in the JS console:
> Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
> in Joyride (created by TourTooltips)
> in TourTooltips (created by FeatureTours)
## Steps to reproduce
1. Start any Feature Tour, or open the [`TourTooltips` story](https://google.github.io/site-kit-wp/storybook/develop/?path=/story/global--tourtooltips) in Storybook.
2. Open the JS console.
3. Close the tour.
4. See the error in the console.
## Screenshots
https://user-images.githubusercontent.com/18395600/208684388-d4379996-46cc-4517-9969-99eb788c9e66.mp4
## Additional Context
- PHP Version: any
- OS: any
- Browser: any
- Plugin Version: 1.89.0
- Device: any
---------------
_Do not alter or remove anything below. The following sections will be managed by moderators only._
## Acceptance criteria
* Closing a Feature Tour should not result in a JS console error.
## Implementation Brief
* Using `assets/js/googlesitekit/datastore/user/feature-tours.js`, within `dismissTour`, dismiss the tour (`DISMISS_TOUR` action), last, i.e after `yield fetchDismissTourStore.actions.fetchDismissTour( slug );`.
### Test Coverage
* No new tests to be added.
## QA Brief
* Check any feature tour and verify that it works as intended (nothing has changed) and there are no js console errors in the browser.
## Changelog entry
*
Contributor guide
Assessment
This issue has not been assessed yet.