Category "redux-toolkit"

How to extract selectors from adapter from queries with arguments

I'm trying to extract selectors from queries in my apiSlice as said in this documentation: https://redux.js.org/tutorials/essentials/part-8-rtk-query-advanced T

Providing two combined Reducers for my redux saga store prevents my websocket channel message from triggering, but only one does not?

Configured my store this way with redux toolkit for sure const rootReducer = combineReducers({ someReducer, systemsConfigs }); const stor

Redux toolkit filter() not working when wanting to display new array at the same time

I am currently building a clothing shop in which you can add products to the cart, and delete each one of them as you like and it makes the cart re-render and d

Redux store data being reset upon "getServerSideProps" being called; not persisting

Overview: I have a TypeScript NextJS project that I am using Redux-toolkit with to manage state. My file structure for my Redux store and pages are as follows:

How do I unsubscribe to the dispatch to grab new data onload on useEffect? - I'm using Redux Toolkit

I can load my data but only after I refresh the page. Until then, it shows the data from the previous item I clicked on. It's behaving like a cache would. Here

making post request with createAsyncThunk redux toolkit

Following is my reduxtoolkit code. I am trying to post data but it is giving me 422 error. The response says spot_id and item_id required but I am sending it. A

An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft

I understand this has been asked before but so far no answers except someone making a syntax mistake. I have verified this against every tutorial I've seen onli

How can I call Rtk Query Hook when the condition changes?

I created the endpoint with createApi: export const postsApi = createApi({ reducerPath: 'postsApi', baseQuery: fetchBaseQuery({baseUrl: 'https://jsonplaceho

why am i not getting the data from Rapidapi

i want to use rapidapi to get some data using redux, but when i console.log the data i will be getting GET https://coinranking1.p.rapidapi.com/coins/coins 401

How to purge any persisted state using react tool kit with redux-persist

In the official documentation it says to add an extra reducer in order to purge the state of the current slice, however there is no a clear example everywhere i

Type 'MyType' is not assignable to type 'WritableDraft<MyType>'

I use @reduxjs/toolkit and my state contains: allSlides: ISlide[]; When I try to change anything in allSlides like ex. setAllSlides(state, action: PayloadAction

Not able to see exact error message at Redux

I have the almost same issue that asked before I have tried to use the same solution but could not manage it. All I want to see is to get correct error message

useSelector doesn't update value in Next.js

I have a problem, createAsyncThunk function makes request to server (axios) and then get data, after that extraReducers handle builder.addCase in it and makes s

How to use createAsyncThunk with Typescript? How to set types for the `pending` and `rejected` payloads?

Right now I've got these actions that I use for an upload thunk's lifecycle. type UPLOAD_START = PayloadAction<void> type UPLOAD_SUCCESS = PayloadAction

Adding a payload to createAction function using reduxjs/toolkit

How do i add a payload to createAction from the now function? convert from this: import { ADD_ARTICLE } from "../constants/actions-type" import { createAction }

Next Auth V4 (With Redux Toolkit): Pass in Redux Store Data to Next Auth while performing sign In

I want to trigger the Sign In callback in Next Auth along with the redux store data. How can I access the store within my nextAuth sign In the callback, here's

(react redux toolkit) i want to know using action with multiple prameters

i recently started @reduxjs / toolkit. when i see code or documents of this, it not is not worked (undefined...) or too complicated(prepare?? createaciton??). i

Should I use Redux or Redux-Toolkit? [closed]

I am new in studying Redux. Then I know the existence about Redux-toolkit. My question is which should I use? Can Redux-toolkit replace Redux

Redux -Having a 404 errror and state.category.push(action.payload) not a function error

I'm getting a 400 client error and saying state.category.push is not a function and the current state is pending. I will be happy if someone helps me out on thi

How to run async call on a reducer?

import { createSlice, PayloadAction } from "@reduxjs/toolkit" import { Dispatch } from 'redux'; import axios from "axios" const API_URL = process.env.REACT_APP_