File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,22 @@ solution.
1111
1212This guide will walk you through the process.
1313
14+ ## Choosing the Right Base Class
15+
16+ In the world of React, developers often use Higher-Order Components (HOCs) to reuse component logic. In Neo.mjs, you
17+ achieve a similar result through class extension. The key to creating a robust and efficient custom component is
18+ choosing the correct base class to extend.
19+
20+ Instead of extending the most generic ` Neo.component.Base ` class, look for a more specialized class that already
21+ provides the functionality you need.
22+
23+ - If your component needs to contain other components, extend ` Neo.container.Base ` .
24+ - If you're creating an interactive element, extending ` Neo.button.Base ` gives you focus and keyboard support.
25+ - If you need a custom form field, look for a suitable class within ` Neo.form.field ` .
26+
27+ By choosing the most specific base class, you inherit a rich set of features, saving you from having to reinvent the
28+ wheel and ensuring your component integrates smoothly into the framework.
29+
1430## Overriding Ancestor Configs
1531
1632The simplest way to create a custom component is to extend an existing one and override some of its default
You can’t perform that action at this time.
0 commit comments