Category "redux-toolkit"

does redux change the reference of rootState object when a field's value in a sub state changes?

i have my redux states setup like this rootState subState1 field1 field2 subState2 field1 field2 multiple sub

RTK Query: Specifying error type per endpoint

Is there a way to specify error response per endpoint? Like we can specify Result & Request type when defining a query or mutation. I did went through the d

How to apply createEntityAdapter to createApi slice

I have implemented successfully a redux-toolkit api. Now Im trying to use createEntityAdapter to be able to use the pre-built selector methods. import { creat

Removing a value from an array using redux toolkit

I am new to using "@reduxjs/toolkit" (version "^1.5.1"). I am trying to remove an object from within the state's array (roundScore). This is usually something t

Redux Toolkit Query real time updates

is it possible get real time updates maybe I have a product and the amount of product goes from 2 to 1, can I show this in real time with rtk query ?

How to get updated state from Redux store using redux-toolkit after component has already rendered?

The functionality I am looking for is that of an e-commerce website. A click on the add-to-cart button adds product to cart. I am able to successfully achieve t

RTK query with Storybookjs

I am using RTK query with typescript in my react application and its working fine however storybookjs is not able to mock data for RTK query. I am trying to moc

Redux Toolkit: can I use createAsycThunk with Firebase listener functions (e.g. firestore.collection.onSnapshot)

Is there a way to use createAsyncThunk with Firebase listeners, for example firestore.collection.onSnapshot? It may not work because the way onSnapshot works (i

redux-persist is not saving my redux state when I refresh or close my react-native app

My react-native app is not saving my data using redux toolkit, redux-persist and asyncstorage import AsyncStorage from '@react-native-async-storage/async-storag

Redux-toolkit multiple AsyncThunk at one slice

What is the best approach to manage multiple AsyncThunk at single slice. Would be correct if I put computed properties of each async action? export const regist

How can I keep my useSelector() variable from a redux store updated after each dispatch?(Redux Toolkit)

So I'm using React Native with Redux Toolkit and I'm facing this issue where once I dispatch and decrement a store value, the variable inside the component that

Dispatch actions with Redux Toolkit requires two arguments

Using Redux Toolkit, I'm trying to dispatch an action without context of event or etc., so I get the following error: error TS2554: Expected 2 arguments, but g