I'm using redux toolkit RTK with multiple hooks inside one single component, but the issue is that they are running together even I'm using the params skip
which I dont want it in this case, here is my code:
const { data, isFetching } = useGetTestsQuery(filters, {
pollingInterval: 5000
});
const {
data: testsByStatus,
isFetching: fetchDataByStatus
} = useGetTestsByStatusQuery(filters, {
pollingInterval: 5000,
skip: data
});
return <Table columns={columns} dataSource={data || testsByStatus} />;
in network tab I can see that both requests are running in same time, can I prevent eg. useGetTestsByStatusQuery
from fetching while there are some data in useGetTestsQuery
or vice-versa ?