Ask HN: What do you think about React Hooks?
Link here: https://reactjs.org/docs/hooks-intro.html
Link here: https://reactjs.org/docs/hooks-intro.html
The conclusion is 1. Throw an exception (which will stop the programm) if it's a programming error. 2. Handle it in place using callback just like you return the error code in other language if that's an operational error (e.g. user didn't input password when login). Emit an error event is really a special case of the callback when you want to handle error somewhere else (maybe globally).
So I think the article is more about when to "throw an exception" vs "return the error" if you take out those javascript special juices.
Very buggy especially when clients disconnect/reconnect. But, it's good starting point if you are interested.