Skip to content

Commit 2ac12a8

Browse files
docs(common): update same name KB with examples
1 parent 0e254c3 commit 2ac12a8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

knowledge-base/components-with-same-name.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ When creating components, make sure that you use unique names for them and their
1414

1515
* You may get the Intellisense and features of one instead of the other, or a mix of both.
1616
* Compilation error.
17-
* Cryptic errors from things and Parameters that should work, such as *error CS0246: The type or namespace name 'TItem' could not be found (are you missing a using directive or an assembly reference?)*.
17+
* Cryptic errors from things and Parameters that should work, such as:
18+
* for a Telerik grid: _error CS0246: The type or namespace name 'TItem' could not be found (are you missing a using directive or an assembly reference?)_
19+
* for a Telerik button _Unhandled exception rendering component: Object of type 'TestProject.Pages.TelerikButton' does not have a property matching the name 'ChildContent'._
1820

19-
This last error message can be observed if you have a component called `TelerikGrid.razor` in your app, and you attempt to use the `<TelerikGrid>` component provided by Telerik UI for Blazor in the same app.
21+
These last error messages can be observed if you have a component called `TelerikGrid.razor` in your app, and you attempt to use the `<TelerikGrid>` component provided by Telerik UI for Blazor in the same app (respectively, a `TelerikButton.razor` and `<TelerikButton>` components).
2022

2123
You will get the intellisense from the Telerik grid, you will be able to define columns and events, but setting its `Data` property will throw this build error because the framework will get confused with your own `TelerikGrid.razor` component.
2224

23-
The solution is to ensure that the component names in the project are unique, both across components in different folders of your own making, and with components from third party libraries you may be using.
25+
The **solution** is to ensure that the component names in the project are unique, both across components in different folders of your own making, and with components from third party libraries you may be using.

0 commit comments

Comments
 (0)