title: Shiny: what is the difference between observeEvent and eventReactive?
body: <p>I read the Shiny documentation about reactive programming a few times now, but I can't properly understand the difference between <code>observeEvent</code> and <code>eventReactive</code>.</p>
  <p>The documentation says:</p>
  <blockquote>
  <p>Use observeEvent whenever you want to perform an action in response to an event. (Note that &quot;recalculate a value&quot; does not generally count as performing an action–see eventReactive for that.)</p>
  <p>....</p>
  <p>Use eventReactive to create a calculated value that only updates in response to an event. This is just like a normal reactive expression except it ignores all the usual invalidations that come from its reactive dependencies;</p>
  </blockquote>
  <p>In all the situation I tried I saw no difference between using <code>observeEvent</code> and <code>eventReactive</code> (the code works just fine regardless the function I use, with no apparent impact in performances).</p>
  <p>Can you help me figure out what is the real difference between the two? Ideally I would like a few examples showing when they are interchangeable, one when <code>observeEvent</code> would work but not <code>eventReactive</code> and vice versa.</p>