cube-js / cube-js/cube

There should be a way to cancel the requests from useCubeQuery when the component has unmounted

Open
#8,263 3 comments 3 reactions 0 assignees View on GitHub
client:core client:react help wanted
Dominant language
Rust
Stars
20.8k
Forks
2.1k
Avg merge
1d 2h
Merged PRs (30d)
181

Description

When we are using the useCubeQuery hook to get the data from cube server & user has routed to some other routes, while the result is being fetched. Then it should cancel out the request , as component from which the request was raised has already unmounted

**To Reproduce**
Steps to reproduce the behavior:
1. create a dashboard with multiple reports on it
2. redirect to another route as soon as you have landed on dashboard
3. In network tab of developer tool, you will see that the requests of reports on dashboard are still active, which is of no use now, as the dashboard component has already unmounted

**Expected behavior**
Requests for reports data should have be cancelled out

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.