# element.updateConfig()

> Use this method to update the configuration of the Element. After calling element.updateConfig(), the Element will re-render based on the new configuration without needing to recreate the instance.

Use this method to update the configuration of the Element. After calling `element.updateConfig()`, the Element will re-render based on the new configuration without needing to recreate the instance.

> **Notes**:
>
> -   This method supports performing a partial update. It only updates the passed parameters while keeping other configurations unchanged.
> -   This method is not applicable to [`CVVElement`](https://docs.antom.com/ac/sdks/web_CVVElement.md).

## **Method signature**

When calling this method, please use the following standard method signature format.

#### Tab: JavaScript

```javascript
element.updateConfig(newConfig)
```

#### Tab: TypeScript

```typescript
element.updateConfig(newConfig: Partial<VaultingAppConfig>): void
```

## Parameters

| **Parameter** | **Data type** | **Required** | **Description** |
| --- | --- | --- | --- |
| _newConfig_ | Object | Yes | The configuration object used to update the Element. > **Note**: Currently, this method only supports updating the configuration of [`VaultingElement`](https://docs.antom.com/ac/sdks/web_VaultingElement.md). However, dynamic updates to _sessionData_ is not supported. |

## Return value

This method does not return any value.

## Best practices

-   Re-rendering: After updating the configuration, the Element will automatically re-render, and buyers may see interface changes.
-   Calling timing: It is recommended to call `element.updateConfig()` after the Element is mounted. If called before mounting, the updated configuration will take effect upon mounting.
-   Theme switching: When dynamically switching themes, the Element will retain data already entered by the buyer and only update the styles.