Skip to content

Commit 3519aa6

Browse files
chore(getting-started): try to simplify language in valu bind vs data bind
1 parent f810d16 commit 3519aa6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

getting-started/value-vs-data-binding.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,25 +36,25 @@ Value binding has two forms:
3636

3737
One-way binding does *not* update the view-model if the component changes this value.
3838

39-
When using one-way binding, you *can* use the `<ParameterName>Changed` event - for example, you can use both `Value` and `ValueChanged`.
39+
When using one-way binding, you *can* use the `<ParameterName>Changed` event. For example, you can use both `Value` and `ValueChanged`.
4040

4141
If you want to update the view-model in this scenario, you should handle the corresponding `<Parameter>Changed` event, and in the handler you will update the view-model with the new data. This allows you to apply some synchronous logic to that new value and effectively cancel the update if you don't set the new value to the view-model.
4242

4343
### Two-way Binding
4444

4545
Two-way binding *updates* the view-model field if the component changes this value.
4646

47-
When using two-way binding, you _cannot_ use the `<ParameterName>Changed` event - for example, if you use `@bind-Value`, adding `ValueChanged` will throw an exception from the framework - the way two-way binding works internally in Blazor is that the event is handled to populate the view-model field already, so you cannot handle it again.
47+
When using two-way binding, you _cannot_ use the `<ParameterName>Changed` event. For example, if you use `@bind-Value`, adding `ValueChanged` will throw an exception from the framework. The way two-way binding works internally in Blazor is that the event is handled to populate the view-model field already, so you cannot handle it again.
4848

4949
## Data Binding
5050

51-
In this documentation, we will refer to Data Binding to the process of providing a component with a collection of data (models) that it will use and display.
51+
In this documentation, we will refer to Data Binding as the process of providing a component with a collection of data (models) that it will use and display.
5252

53-
There is no two-way binding in this case, the flow of the data is from the parent to the child component. If data changes happen in the child component that the parent needs to be made aware of - usually a specific event is raised that the parent can handle and apply the necessary changes to its own view-model.
53+
There is no two-way binding in this case, the flow of the data is from the parent to the child component. Sometimes the parent component needs to be aware of data changes in the child component. The usual approach is to raise a specific event that the parent can handle and apply the necessary changes to its own view-model.
5454

5555
Data binding includes the following steps:
5656

57-
* Creating a collection with the desired set of models/primitive types in the view-model. You would usually obtain it from a data service specific to the app.
57+
* Creating a collection with the desired set of models/primitive types in the view-model. You would usually get it from a data service specific to the app.
5858

5959
* Pointing the `Data` parameter of the Telerik component to that collection
6060

@@ -63,11 +63,11 @@ Data binding includes the following steps:
6363

6464
## Terminology in MSDN vs Telerik Documentation
6565

66-
In the MSDN documentation, the `@bind` or `@bind-Value` syntax is referred to as "Data Binding" because it carries a piece of data to/from the view-model to an input component (like a simple `<input />` or its form equivalent the `<InputText />`).
66+
In the MSDN documentation, the `@bind` or `@bind-Value` syntax is referred to as "Data Binding" because it carries a piece of data to/from the view-model to an input component (like a simple `<input />` or its form equivalent - the `<InputText />`).
6767

6868
In the Telerik UI for Blazor documentation, the `@bind-Value` syntax is referred to as "Value Binding" because it carries field values to and from the view-model.
6969

70-
In the Telerik UI for Blazor documentation, we call "Data Binding" the process of providing a collection of models to a component so that this component can work with them (for example, display them - rows in a grid, appointments in a scheduler, items in a dropdown).
70+
In the Telerik UI for Blazor documentation, we call "Data Binding" the process of providing a collection of models to a component so that this component can work with them. For example, display them - rows in a grid, appointments in a scheduler, items in a dropdown.
7171

7272
In the MSDN documentation, providing data to a component like that is not covered - it uses simple HTML elements and `@foreach` loops to generate `<option>` elements for dropdowns or `<tr>` elements for grids.
7373

0 commit comments

Comments
 (0)