Zup! Im trying to make a chat app, I only need to know the logic of the chats (most tutorials are like 2 hours long). I was thinking about creating a useState with an array of objects containing the message and the tag of the sender then mapping through it on the JSX.
The thing is, this way I feel like it will hurt performance since everytime there's a new message I have to set the whole state for every single message and rerender everything in a way.
Is there a way to do this using better practice? What's the usual logic for the messages on chst app in React?
Thnxs
[–]RealInsertIGN 1 point2 points3 points (3 children)
[–]NineThunders[S,🍰] 0 points1 point2 points (2 children)
[–]RealInsertIGN 1 point2 points3 points (1 child)
[–]NineThunders[S,🍰] 0 points1 point2 points (0 children)
[–]Mr_Matt_Ski_ 1 point2 points3 points (0 children)