7 ms·
I see. Not sure what the best practice is for the losing scope in then chains issue with promises. I ended up creating something along the lines of a message
by grandalf 11y ago
I see. Not sure what the best practice is for the losing scope in then chains issue with promises. I ended up creating something along the lines of a message object designed for each chain, which felt like a smell.
- 15155 11y agoFeels like an un-compiler-assisted State monad. IMO threading an object through is probably the best method, unfortunately. You could use an Immutable Record or something to help keep it under control. I would personally just use async/await to more explicitly handle the sequencing/binding.
- grandalf 11y agoAgreed. I think I'll refactor... thanks for the example.