redux-toolkit
redux-toolkit copied to clipboard
The official, opinionated, batteries-included toolset for efficient Redux development
I’m building a shared API layer using @reduxjs/toolkit/query (non-react) in a separate library, so I can reuse it across multiple platforms like CLI, native apps, and React. Here’s a example:...
The OpenAPI spec: ``` "TestEntityDto": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string", "nullable": true }, "created": { "type": "string", "format": "date-time"...
This comes from https://github.com/mastodon/mastodon/pull/34573 In a component, there was a call to `replies.reverse()`, with `const replies = useState(state => state.contexts.replies)`. The `contexts` reducer is defined here: https://github.com/mastodon/mastodon/blob/main/app/javascript/mastodon/reducers/contexts.ts#L126 This caused errors...
The official RTK Query pagination example hosted on [CodeSandbox](https://codesandbox.io/p/sandbox/github/reduxjs/redux-toolkit/tree/master/examples/query/react/pagination?file=%2Fsrc%2FApp.tsx&from-embed) throws the following runtime error: ``` TypeError: (0 , $csb__react_dom.render) is not a function ``` Stack Trace Snippet: ``` TypeError: (0...
Scenario: When there is a pop-up, this pop-up accepts an external fetch function. When this pop-up pops up, the request is triggered.
When hooks don't require queryArg members (either there are none or all are optional) an empty object still has to be provided to hooks. This leads to a lot of...
I want to generate api and share it (npm lib for example) with different projects, but I faced a problem: @rtk-query/codegen-openapi required an apiFile which includes createApi instance (with baseQuery,...
It would be nice to have an option to export the types from the OpenAPI code generator to a separate file.
https://github.com/reduxjs/redux-toolkit/blob/master/packages/toolkit/src/immutableStateInvariantMiddleware.ts#L57 ```ts function trackProperties( isImmutable: IsImmutableFunc, ignorePaths: IgnorePaths = [], obj: Record, path: string = '', checkedObjects: Set = new Set(), ) { const tracked: Partial = { value: obj...
# Need a way to reset state for specific injected API service or endpoints ## Description I am using `createApi` to define a base API and then injecting additional endpoints...