---
url: "https://vueda.dev/v3/reference/api/js/stores/storeTheme/methods/registerComponent.md"
title: "registerComponent"
---

# registerComponent

## Overview

Registers a new component with the given name.

## Signature

`registerComponent(componentName, componentConfig)`

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| <span id="param-componentName">componentName</span> | `string` | yes | The name of the component. |
| <span id="param-componentConfig">componentConfig</span> | [ComponentConfig](/v3/reference/api/js/stores/storeTheme/types/ComponentConfig.md) | yes | The default variant and spot names for the component. |

### Returns

`void`

### Throws

- If the component configuration is invalid.

## Source

`client/lib/stores/storeTheme.js:96`
