3.10 Observers

3.10.1 When might you use an observer?

  • Anytime you need to make a call out of the application.
    • Saving a file to a shared drive
    • Sending data to an API
    • Updating a database
    • Printing a debugging message
  • Observers don’t affect how the app looks.

There are two important differences between observeEvent() and eventReactive():

  1. You don’t/can’t assign the result of observeEvent() to a variable, so
  2. You can’t refer to it from other reactive consumers.