Questions tagged [rtk]

Real Time Kinematic Is a satellite navigation technique used to enhance the precision of position data derived from satellite-based positioning systems (global navigation satellite systems, GNSS) such as GPS, BeiDou, GLONASS, Galileo, etc

106 questions
0
votes
2 answers

GnssClock method getFullBiasNanos returns a decreasing number every callback when it should be increasing by definition

The method public long getFullBiasNanos () in the GnssClock class is defined to be: the difference between hardware clock (getTimeNanos()) inside GPS receiver and the true GPS time since 0000Z, January 6, 1980, in nanoseconds. So i assumed that…
0
votes
1 answer

rtk createAsyncThunk doesnt update the state

I am trying to auth session by random user with http get request and createAsyncThunk. fetching the user data in App.js on mount hook. I can see the get request in my network and the new fetched state in redux dev tool, but my TopBar.js useSelector…
Sergey Arenzon
  • 325
  • 4
  • 17
0
votes
1 answer

Why RTKQ use*Query returns cached data if refetch fails with 404 error

I'm using RTK Query to GET some data initial GET request returns 200 OK with some data in some minutes data on server is deleted I have refetchOnFocus enabled so my GET request is repeated in some time and now it returns 404 error But use*Query…
0
votes
1 answer

How to get custom Arg in configureStore reducer?

I would like to give additional parameters for Dependency Injection to Reducer. When I created the Store, I added Arguments like this. export default configureStore({ reducer, middleware: (getDefaultMiddleware) => getDefaultMiddleware({ …
0
votes
1 answer

Get data in component tree using RTK Query

I think I misunderstand the purpose of RTK Query. Basically I have an app, where I need to login using email and password, this request returns me userId. That is my API file export const accountApi = createApi({ reducerPath:…
tykhan
  • 81
  • 8
0
votes
1 answer

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'value') redux tookkit passing into float value

Previously everything was working fine when my input was int/ numbers only but I tried to change input type to float. That's when things starts getting weird. React itself will run up to 2x for my inputs before showing error. The below is my…
boyboi
  • 11
  • 1
  • 3
0
votes
1 answer

Pattern for waiting for cache data to reload after a mutation

I'm trying to figure out the right way of waiting for cache data to reload after a mutations is invoked. I would like to indicate the loading state until the data is fully reloaded. Currently I do something along the lines of: const [start,…
0
votes
2 answers

useDispatch in a function outside react component / redux tool kit

I need a help to solve this error: "useDispatch is called in function that is neither a React function component nor a custom React Hook function". Explanation: store.js and userSlice.js hold the definition of my Redux related things…
Bruno Colli
  • 3
  • 1
  • 3
0
votes
1 answer

rtk query - how to update chached data without calling updateCachedData

I am working with rtk query and I have 2 different sources of data: ongoing websocket connection that updates cache with updateCachedData whenever relevant notification is received, http requests to the api to get an existing data from db The…
mnbxx
  • 55
  • 5
0
votes
1 answer

Redux Toolkit Query not invalidating tags and cache in non - debug or production mode

In my application when a user is logged in as a guest an authorization token is stored in Async Storage which is then used to fetch data from the API. When the Guest logs into their account, The token is updated in Async Storage and is also updated…
Sanjay Kapilesh
  • 269
  • 1
  • 4
  • 16
0
votes
1 answer

How to ensure that the request has been sent before manually reading the cache?

Like this example: constructing-a-dynamic-base-url-using-redux-state, I need to get the data of a certain endpoint from the cache to build fetch arg, I can get the data by api.endpoints.getPost.select(postId)(getState()), But how do I ensure that…
Mxcpanel
  • 95
  • 7
0
votes
0 answers

RTK recall api when set new state

I have a api with rtk (redux-toolkit) with a state 'search' const [search, setSearch] = useState({nexToken: null}) const { data, isLoading, isError } = useGetPostQuery(search ?? skipToken) useEffect(() => { console.log('data', data) },…
fabio87
  • 65
  • 6
0
votes
1 answer

Skip arg parameter in createAsyncThunk

I want to skip the first parameter arg of the createAsynchThunk, to access only to the extra parameter to acess the api service I'm sending as extra parameter, is there a way I can skip the arg parameter without using _, undefined or anything like…
Luis Cárcamo
  • 309
  • 1
  • 3
  • 11
0
votes
1 answer

How to re-dispatch action in Saga like redux toolkit Automated Re-fetching

I am trying to implement redux-saga action dispatch functioning like Automated Re-fetching in the redux toolkit. When opening the app, I dispatch some actions to fetch data from the server and update the redux store. When the user stays background…
Sungpah Lee
  • 1,003
  • 1
  • 13
  • 31
0
votes
1 answer

How to structure data reducers in Redux-toolkit with multiple apis

I'm beginner developer developing an application with react using typescript and redux-toolkit (mainly with createSlice, createAsyncThunk). I'm still confused on how to structure/manage data with multiple data apis for example : there are 3…