Best way to subscribe to typed events ReasonML that originate in Javascript?


I want to have event listeners or reactive streams in ReasonML, where I can push typed things into them from javascript.

For example:

  • We have a list of operations in javascript
  • We append to that list regularly
  • I want various ReasonReact components to subscribe to and process every new operation

Is there a best practice for this?


On the ReasonReact side, you can use the subscription helper:

They’re lightweight, get the job done, and easy to move away from if they’re not suitable.