# Props

#### registerComponent Props

| Name           | Value                                                                | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| -------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| type           | `'none'`, `'record'`, `'list'`, `'nested-list'`, `'standalone-list'` | <p>Define the component type and how the component get its data.<br></p><ul><li><code>record</code> - <em>component with the data source is reference to the table selected in page context</em></li><li><code>list</code> - <em>component with a different data source from the page context, but the state property defined in its component would still reference from the table selected in page context</em></li><li><code>nested-list</code> - <em>like a <code>list</code> component, but used to get many to many or one to many data relation</em></li><li><code>standalone-list</code> - <em>like a <code>list</code> component, but the defined state property in this component is going to be reference from the table selected in this component source.</em></li></ul> |
| propDefinition | `Object`                                                             | Define the *`schema`* of properties in the component                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| defaultProps   | `Object`                                                             | Define the *`default value`* for registered properties in propDefinition                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| Component      | `React Component`                                                    | Render a custom component that will be shown on apps                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |

#### Component props

| Name       | Description                                                                                                                               |
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| hooks      | [component hooks list](https://github.com/feedloop/qore-apps/pull/594/files?short_path=07185a1\&unchanged=expanded#component-props-hooks) |
| source     | Get detail of selected source table if you are using `list`, `nested-list` type component, `standalone-list`.                             |
| pageSource | Get detail of selected source table if you are using `record` type component.                                                             |
| properties | Value of the defined properties in propDefinition                                                                                         |
| instance   | Schema of the component                                                                                                                   |

#### Component props hooks

| Name             | Description                                                                                                                       |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| useTemplate      | make a template of the `string` value if the it's uses the suggested `@` tag. if it's not, it would be trait as a normal `string` |
| useActionTrigger | create an action trigger, usually used with a property defined as `action` type                                                   |
| sourceHooks      | an axios client wrapper used to make request to selected source.                                                                  |

<br>
