I mean that each time you chain a function using then that function is added to the queue which means that it will wait for at least a tick to be called, my only concern is if during that tick a variable, that one of the callbacks relies on, is modified. Maybe is not a pressing matter, just a concern I have.
❤️ OSS, I share software development know-how & contribute to the projects I rely on (and admire) most: @nodejs @lodash @mongodb @docker @minio @bluebird et al.
I mean that each time you chain a function using
then
that function is added to the queue which means that it will wait for at least a tick to be called, my only concern is if during that tick a variable, that one of the callbacks relies on, is modified. Maybe is not a pressing matter, just a concern I have.Nice post tho.
@Pichardo Promises resolve only once, and their value is immutable. And in a functional promise chains each step results in a read-only state.