diff --git a/en/application-dev/quick-start/arkts-restrictions-and-extensions.md b/en/application-dev/quick-start/arkts-restrictions-and-extensions.md index fa62ed392100f7ff0b60dcc6e8ee66ef465fbb3a..b2f31f9aae3188dddfb011f94d971c0db3855d99 100644 --- a/en/application-dev/quick-start/arkts-restrictions-and-extensions.md +++ b/en/application-dev/quick-start/arkts-restrictions-and-extensions.md @@ -232,3 +232,26 @@ struct Child { } } ``` + +## Restrictions on Naming Custom Components, Classes, and Functions + +The name of a custom component, class, or function cannot be the same as any system component name. + +Example: + +``` +// Rect.ets +export class Rect { + constructor(){} +} +// Index.ets +// ERROR: The module name 'Rect' can not be the same as the inner component name. +import { Rect } from './Rect'; +@Entry +@Component +struct Index { + build() { + + } +} +```