Technical requirements
This chapter relies on the GitHub solution accessible here: https://github.com/PacktPublishing/Mastering-SharePoint-Development-with-the-SharePoint-Framework-/tree/chapter5/building-a-webpart. You need to first clone the repository locally on your machine to be able to follow the steps. As the solution is built step by step, for each section in this chapter, a dedicated Git branch has been created representing the solution at a specific state corresponding to a section.
Before reading the section, you must check out the corresponding branch before using either the Git command line or a Git client such as GitHub Desktop, Sourcetree, and so on.
Code snippets
For brevity and readability considerations, only the relevant parts of the code are detailed in the provided snippets in this chapter. For these reasons, ad hoc code such as dependencies, imports, and updates to certain files may be omitted. We recommend having the GitHub solution open alongside to...