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
1
vote
1 answer

TypeError: Object is not a function or its return value is not iterable .. in redux rtk while trying to use mutation function

this is my Apis Setup import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' export const bugApis = createApi({ reducerPath: 'Bug', baseQuery:fetchBaseQuery({ baseUrl: 'http://localhost:5000' }), …
wiz kenny
  • 11
  • 3
1
vote
1 answer

Redux toolkit running multiple queries even with preventing it

I'm using redux toolkit RTK with multiple hooks inside one single component, but the issue is that they are running together even I'm using the params skip which I dont want it in this case, here is my code: const { data, isFetching } =…
Errand
  • 51
  • 5
1
vote
2 answers

React Redux Problem: How to call multiple api in your react component with React Redux Toolkit RTK queries?

Hope you all are doing fine. RTK queries return response in data attribute which can be accessed via hook generated by RTK My Code: const {data = [], isFetching} = useFetchConversationQuery(categoryId, { skip }); const { data } =…
Obaid Aqeel
  • 199
  • 1
  • 1
  • 10
1
vote
1 answer

How to access rtk-query slice data for given endpoint / from prepareHeaders?

I have troubles solving common problem, that should be handled by RTKQuery. When my application starts, it will load configuration. This configuration will contain stuff like baseUrl, some data used in headers etc. I've used createApi(...) to create…
Chris Panayotoff
  • 1,744
  • 21
  • 24
1
vote
1 answer

How to handle the error and success notification in a common way(middleware) using RTK Query?

I am new to RTK queries, and I like to work with RTK queries. In my project, I would like to add a common error handler(middleware) also a success response handler. For error handling, I found a middleware utility from RTK query documentation. Using…
Anji
  • 689
  • 1
  • 5
  • 24
1
vote
1 answer

redux-toolkit prepareHeaders is not a function

I have issues when I use this query, it says that prepareHeaders is not a function but I added it as an object as you can see in my code below: const access_token = localStorage.getItem('rs_access_token'); // Define a service using a base URL and…
Bon Andre Opina
  • 2,129
  • 2
  • 15
  • 33
1
vote
1 answer

How to use preloadedState in Redux Toolkit

I want to save changes in state even if the page is reloaded. I've checked my oldState const in console.log and it works. But my ui doesn't show state from local storage. How can I use my oldState const in preloadedState? const saveState = state =>…
1
vote
0 answers

ZED F9P RTK post processing rover + base setup: Which messages to log?

I am creating a setup with the ZED F9P where I have a rover and base station. Both devices have their own ZED F9P, but cannot communicate with eachother in realtime due to constraints. Because of this I want to do post processing using RTKLIB or…
Jesse
  • 11
  • 2
0
votes
0 answers

Showing data for the longest api call instead of the latest api call redux toolkit

I have a list of items. on which i click and get that items ID and get details from database according to that id. I have a form which create a new item and then refetch list of items and the also fetch the detail of latest item and show the latest…
0
votes
0 answers

How to handle RTK in a multipage Next 13 Application

I am using next 13 with RTK.I am using Dispatch on Page.tsx. Page.tsx is rendering Home Page. I set initiall state on home page. But if I refresh or visit my profile page from url, Redux store is not initialized. As it is only initialized when we…
0
votes
0 answers

RTK Query: I get "FETCH_ERROR" when using params that contain "://"

I have a query param that starts with xyz:// and as soon as I launch the query I get this error: { "status": "FETCH_ERROR", "error": "TypeError: Network request failed"} Here's my endpoint code: ... getHealthRecords: builder.query
abdou-tech
  • 687
  • 1
  • 8
  • 16
0
votes
0 answers

Having trouble understanding rtk queries

I'm having trouble understanding how to properly use rtk queries in my code. Initially, they're loading as undefined, which is why I'm adding if statements looking for truthiness, but then this leads to the following React error: Uncaught Error:…
Mathew
  • 318
  • 11
0
votes
0 answers

rtk query, transforming response to capitalize first letter of object keys not working

I'm doing the following to capitalize all keys of an object response: getBudget: build.query({ query: () => "budget", providesTags: ["Budget"], transformResponse: (response: BudgetType) => { const deepCopy =…
Mathew
  • 318
  • 11
0
votes
0 answers

How to generate GPS / GNSS input stream for RTKLib as a Rover simulation?

I'm using RTKNAVI in RTKLib. The RTKLib provides example data in a recorded file, in NovAtel OEM6 format, for Rover input stream. The supported data format now is from common format or property brands: RTCM2/3, NovAtel, u-blox, Skytraq, BINEX…
trung
  • 81
  • 1
  • 1
  • 5
0
votes
1 answer

Is there any need to use normalised state with createEntityAdapter while using RTK Query?

I recently started using RTK Query and I've seen on the advanced patterns of the documentation they talked a lot about state normalisation by using createEntityAdapter and using that kind of a normalised state {ids: [1,2,3], entities: {1: {..}, 2:…
AIMEUR Amin
  • 320
  • 1
  • 19