why angular?

you don't have to

but we'll use it and utilize the rxjs library

  1. rxjs Subjects are both an Observable and an Observer
  2. listen to and send messages
  3. Subject watches websocket for incoming messages and broadcasts these messages to any components subscribed to it

credit: Elliot Forbes