Learning the reactive pattern for tracking the bulk operation’s progress
Tracking the progress of bulk operations is very important, as it provides feedback to the user and can identify potential issues. When it comes to approaches for tracking progress, there are different strategies and techniques depending on the nature of the bulk operation and the technology stack you’re using. For example, you can use an increment counter to show when each operation is processed, use a percentage to track the progress of the operations, or even log the progress to a file or database.
In the case of our recipe app, in order to track the progress of the bulk upload, we will use the percentage of completion strategy. To implement this strategy, we will use a very useful operator called finalize
.
The finalize
operator allows you to call a function when the Observable completes or errors out. The idea is to call this operator and execute a function that will calculate the progress...