Relative Content

Tag Archive for reactjsredux-toolkit

RTK Toolkit store reducer that updates a list of objects conditionally causes UI lag and occasional crash

I have a dashboard that needs to maintain reasonably up-to-date data. I achieve this by using rtk-query with a pollingInterval to fetch the data from my API periodically. The server maintains a short-lived caching layer to avoid multiple clients making redundant requests to the database. I also have a redux store that I update with this data, which is used throughout the application. The data polled is an array of fairly simple objects.