Exploring the updateView method
Before we begin exploring the updateView method, let's revise some of the things we learned about in Chapter 4, Project Overview and the Component Life Cycle. We learned that, during the component life cycle, updateView is invoked whenever the value is changed by the host. We also learned that updateView is invoked when a bound property defined in the manifest file is changed by the user. There are other reasons why we would wish to invoke the updateView method, so we will be exploring some of those reasons to better understand the importance of the updateView method.
Using the example library in the 1.UpdateView-GetOutputs folder provided for this chapter, build the PCF project and start the test harness. Let's go through some scenarios that will help you understand how the updateView method works:
- First-time load
When the code component initially loads, we know that the init method has been invoked. This is followed by the updateView...