r/reactjs • u/Old-Spinach-1739 • Jun 09 '26
how to handle high frequency data in frontend react/nextjs without any delays/browser issues? any help
i have backend where it recieve data very frequently similar to backpack.app
so, how we can handle these data on frontend?
what will be the best approach to prevent from delays and browser thread locking ?
any Help??
0
Upvotes
2
u/yksvaan Jun 09 '26
Receiving data won't make any difference unless it's completely ridiculous amounts with very high bandwidth. So if your "very frequently" is e.g. every 100ms and payload is some kilobytes, it's not any issue.
1
u/math_rand_dude Jun 09 '26
Besides the tech, think a bit more about how to display the data and what is important.
1
u/Former_Assistance208 Jun 09 '26
you can also use React Virtuoso so that if you have a million row, only the ones showing currently in the screen will be mounted in the DOM.
1
u/Grenaten Jun 09 '26
Just use Tanstack query and chill.
But to answer your question a bit more. I worked for one wallet and multiple dapps. Usually, data is not "live". There is always some delay because most data needs to be fetched on backend first. You do not want to trash RPCs with constant polling from many clients. Instead you have a general backend that will fetch the data from RPCs, process it and then update clients. For individual transactions, you are awaiting the response from RPC and update the client the moment it is available.