Broadly speaking, the observables hype seems to suggest that you can just have a single message observable and it serves the same purpose as a promise. This is different from having multiple promises, which are more conceptually multiple *independent* request/response type transactions. Observables are about getting and processing a "stream" of multiple values for a single subscription/request. ![]() The more understandable your code is, the longer life it will have as new developers come to your code (or you, later) and can understand it and fix it instead of not understanding and just replacing. The proper way to think of ES6 features is that they're not new things you couldn't do before, but better (more readable, understandable) ways of doing old things. * generators + promises, for sync-looking async ( and ) * interpolated string literals, aka "template literals" ( )
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |