A library I contribute to had lots of questions from people asking how to use it with React the right way, including correct Observable cleanup and unsubscribe behavior. There was already something similar for Angular, so I decided to write one for React.
https://www.freecodecamp.org/news/build-chat-app-with-stomp-and-react/