In my app, I need to display the historic state of a server, similar to following image:
The endpoint I use is a normal GET fetch. So I need polling to retrieve the data periodically:
const { data, isFetching, error } = useGetServerStateDataQuery(id, {
pollingInterval: 3000,
})
console.log(data) // data only contains LAST response :(
The problem is that data only contains last response, and I need the historic of all responses to be able to draw the progress. Is there any built-in redux-toolkit solution to access the history of responses?
