We will cover the following tasks in 1 hour and 1 minute:
The Coffee Recommender App
In this chapter, we will gather context for all upcoming chapters by understanding the inner working of our desired application.
Based on the choices entered by the user like the size and milk used, the application renders a list of recommended beverages along with a graph for nutritional values.
In this chapter, we will design a plot that will act as an output for the selections the users will make using our input widgets. By changing the various reactive functions we use in the server object, we will observe changes in rendering of the output.
In this chapter, we will understand the Reactive Expressions in great detail. Reactive expressions lets us control which parts of our app update when, which prevents unnecessary computation that can slow down our application.
In this chapter, we will use the reactive expressions from the previous chapter to render an interactive table in the application. The table acts as the output, in conjunction with the plot. We will observe how changes in the input and various reactive functions influence the output.
Sometimes it’s useful for an observer/endpoint to access a reactive value or expression, but not to take a dependency on it. For example, if the observer performs a long calculation or downloads large data set, we might want it to execute only when a button is clicked. In this chapter, we will understand and apply Isolate expressions which cater to these use cases.
Event Reactive expressions
In this chapter, we will apply the Event Reactive expressions in our application and explore the difference between Reactive expressions and the Event Reactive expressions. eventReactive is used 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
Observe Event expressions
In this chapter, we will apply the Observe Event expressions in our app and differentiate it with expressions we saw previously. observeEvent is used whenever we want to perform “an action” in response to an event.
In this chapter, we will review all the reactivity concepts applied in this session. While the purpose of each type of expression covered is to provide interactivity in different ways with different conditions, understanding the subtleties between their functioning can greatly enhance our ability to use Shiny’s reactivity model to our advantage.