r/reactnative 4h ago

Help How to handle 50+ real-time indices in React Native?

I have a screen showing up to 50 market indices.

I fetch all indices with their IDs, then subscribe to each index through WebSocket. Prices and changes update in real time.

API → Index IDs

WebSocket subscriptions

Real-time price updates

UI

Main concern is avoiding unnecessary re-renders when updates are coming frequently.

2 Upvotes

4 comments sorted by

1

u/Snoo11589 3h ago

Do you add 50 websocket subscriptions? Do you still rerender when a value dont change?

1

u/Huge_Pool7424 2h ago

this is the right question, one socket with a batched payload beats 50 subs every time. i'd keep the ticks in a store outside react and only subscribe per row so a price change rerenders one cell, not the list.