Discussion about this post

User's avatar
Heiko's avatar

I guess I'm on the "enum" side for a couple of reasons (some of which may or may not happen eventually):

The callback looks nice for an Event Emitter. Downside is, there are two states now. One internal state of the recorder and then a state you need to track within the consumer of that recorder. Now the app is responsible for correctly tracking all state changes - which absolutely can be done, but requires you to actually do that.

However, once you want to just query the state of the Event Emitter you are screwed (I could imagine some sort of shared resource), as you only get an Event on state change. Just my belly feeling, but this smells less robust to me.

Expand full comment
2 more comments...

No posts

Ready for more?