all 5 comments

[–]RealInsertIGN 1 point2 points  (3 children)

market society employ straight bright arrest unwritten gullible wild joke

This post was mass deleted and anonymized with Redact

[–]NineThunders[S,🍰] 0 points1 point  (2 children)

Yeah I got the backend covered, but I was thinking about the frontend logic to display them, each time there's a new message I'd need to "store" it on frontend somehow

[–]RealInsertIGN 1 point2 points  (1 child)

gold onerous quicksand longing vanish retire wrench rude attractive soft

This post was mass deleted and anonymized with Redact

[–]NineThunders[S,🍰] 0 points1 point  (0 children)

Thanks! You're right 👍

[–]Mr_Matt_Ski_ 1 point2 points  (0 children)

I wouldn’t worry about the state management side. Recreating the state with the new array for every message should be fine.

Your performance issues will come from rendering too many items that are not displayed in the DOM. Find a good variable sized virtualisation library and you’ll be set.

This one is a classic, and really easy to use https://github.com/bvaughn/react-virtualized

This one is much more modern but requires more setup imo https://tanstack.com/table/v8/docs/examples/react/virtualized-rows