An example of making asynchronous calls to an API using several patterns including the saga pattern.
Each source file is accompanied by a test file. The tests can be run by invoking npm test
.
By exploring each source and test file, you will see how the saga pattern encapsulates the complexities of working with asynchronous code (error handling, race conditions, etc.) without making any asynchronous calls over a network.