Mark Erikson

Results 1264 comments of Mark Erikson

Not sure about the "in the component" part. The preferred approach would be to use `await dispatch(myAsyncThunk()).unwrap()`, which would actually throw an error: - https://redux-toolkit.js.org/api/createAsyncThunk#unwrapping-result-actions

Can you provide an actual repro? That doesn't give much to go on.

Given that, it sounds like this is an issue outside of RTK, so I'll close this.

I think there was some discussion in the original issue around possibly trying to make the behavior more targeted in _which_ queries it waits for, but we opted to defer...

@elburro1887 it's something we can consider, but changing that would have to wait until the next major. Do you have any links to these other discussions you're referencing? I haven't...

In one sense, this is partly expected behavior. When a component unmounts, it decrements the subscriber count to that cache entry. But, even when there are 0 subscribers left, we...

Out in https://github.com/reduxjs/redux-toolkit/releases/tag/v2.9.0 !

I'm not clear what the actual issue report is. Is this a types problem, or a runtime problem? Can someone provide a reproduction?

It's most likely from me restructuring the query thunk logic in the infinite query PR: - https://github.com/reduxjs/redux-toolkit/pull/4738

Okay, I think I've tracked down the cause. Up through 2.5.0, the [relevant logic here](https://github.com/reduxjs/redux-toolkit/blob/v2.3.0/packages/toolkit/src/query/core/buildThunks.ts#L384C1-L408C8) was: ```ts if (forceQueryFn) { result = forceQueryFn() } else if (endpointDefinition.query) { result =...