Test Single-page Application Components
Understand the specifics of a single-page application component and its testing, such as lifecycle hooks and event handlers.
We'll cover the following...
We’ll be looking at class-based single-page application (SPA) components. Angular, React, and Vue all support class-based components.
SPA components generally expose lifecycle hooks (or methods) that can be used to do specific actions at certain times. For example, wait until the component is initialized (or mounted/displayed) before making a call to the API to fetch some data. And at the time of its destruction (or unmount), stop any further processing.
Click the following links for examples of component lifecycle hooks from the aforementioned SPA ...
Access this course and 1400+ top-rated courses and projects.