Subscribing to Store Updates

Up until here we have dispatched our actions, made sure the reducer received them and then responded with updates. The next step is to receive a notification of the update using store.subscribe().

We'll cover the following...

When you visit the bank, let the Cashier know your intended WITHDRAWAL action, and successfully receive your money, what next?

Most likely, you will receive an alert via email/text or some other mobile notification saying you have performed a transaction, and your new account balance is so and so.

If you don’t receive mobile notifications, you’ll definitely receive some sort of ‘personal receipt’ to show that a successful transaction was carried out on your account.

Okay, note the flow. An action was initiated, you received your money, you got an alert for a successful transaction.

We seem to be having a problem with ...