Pages are special kinds of Blazor components that can be accessed directly by the browser (this is not quite true, but we can think of it like that). They have the .razor extension and, by convention, should be placed in a folder called Pages under the root folder of our app (or in a folder underneath it). The first line of the file should have a @page directive (similarly to Razor Pages)—something like this:
@page "/Home"
This may seem unnecessary, but this should contain the route that the page accepts, which is likely the same name of the file, without the .razor extension, but doesn't have to be so. If a page does not have a @page directive, it cannot be accessed by Blazor directly. We'll talk more about this when we discuss routing later on in the chapter.
All Blazor components (and a page is a component) must implement an IComponent interface, of which ComponentBase is the most obvious, already implemented choice....