Surface Razor Components in View Components topic (#12412)

pull/12415/head
Luke Latham 2019-05-14 12:55:03 -05:00 committed by GitHub
parent f603e04127
commit 669a5fe172
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -3,7 +3,8 @@ title: View components in ASP.NET Core
author: rick-anderson
description: Learn how view components are used in ASP.NET Core and how to add them to apps.
ms.author: riande
ms.date: 1/30/2019
ms.custom: mvc
ms.date: 5/14/2019
uid: mvc/views/view-components
---
# View components in ASP.NET Core
@ -35,6 +36,8 @@ View components are intended anywhere you have reusable rendering logic that's t
A view component consists of two parts: the class (typically derived from [ViewComponent](/dotnet/api/microsoft.aspnetcore.mvc.viewcomponent)) and the result it returns (typically a view). Like controllers, a view component can be a POCO, but most developers will want to take advantage of the methods and properties available by deriving from `ViewComponent`.
When considering if view components meet an app's specifications, consider using Razor Components instead. Razor Components also combine markup with C# code to produce reusable UI units. Razor Components are designed for developer productivity when providing client-side UI logic and composition. For more information, see <xref:blazor/components>.
## Creating a view component
This section contains the high-level requirements to create a view component. Later in the article, we'll examine each step in detail and create a view component.