I am trying to build a chat application using AWS API Gateway(WebSocket) and React.
The issue is I receive prev message only when I send a new message.
I am adding