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
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
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
I created the endpoint with createApi: export const postsApi = createApi({ reducerPath: 'postsApi', baseQuery: fetchBaseQuery({baseUrl: 'https://jsonplaceho
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
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
I use @reduxjs/toolkit and my state contains: allSlides: ISlide[]; When I try to change anything in allSlides like ex. setAllSlides(state, action: PayloadAction
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
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
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
How do i add a payload to createAction from the now function? convert from this: import { ADD_ARTICLE } from "../constants/actions-type" import { createAction }
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
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
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
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
import { createSlice, PayloadAction } from "@reduxjs/toolkit" import { Dispatch } from 'redux'; import axios from "axios" const API_URL = process.env.REACT_APP_
Can't figure out how to get optimistic updates to work properly when I'm creating a new item rather than updating the existing one. The optimistic updates do wo
I found this code from redux documentation // test-utils.jsx import React from 'react' import { render as rtlRender } from '@testing-library/react' import { con
I get the following error when I add a specific action in the extraReducers inside a slice: Uncaught TypeError: Cannot read properties of undefined (reading 'ty
I recently started using redux-toolkit and started writing my reducers using the createSlice following their docs. One reducer, let's call it reducerA, imports