With this new syntax, waiting for a timer looks almost the same as traditional sleep call in a synchronous language. Only then it’ll be treated as the newest for production usage.Īmong all the listed features, Stable Timers Promises API is probably one of the most interesting for average developers, and it will be used most.ĭo you remember the evolution of async code management?Ĭallbacks → Promises → Generators → Async/awaitįor some unclear reasons, setTimeout function was stuck for years and years in callback syntax and we had to deal with it in such a way: console.log('It will be printed 1-st') function oldStyleMethod() newStyleDelay() console.log('It will be printed 2-nd') The authors have time to add support for all its features and after six months it will be moved to Active LTS status. It means it’s already usable, can be installed on your environment, but still not recommended for production. ![]() As for now, version 16 will remain in Current release status for six months.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |