title: How to communicate between react service and a component?
body: <p>I had created a util .js file that calling rest api's, and I need to communicate between this util (not a component) and other components.</p>
  
  <p>For example, when doing login if it fails to raise an event that Login component will catch and act accordingly.</p>
  
  <p>Not sure if it's the right approach (I'm new to react), how it can be done?</p>