Skip to main content
Browse Documentation

Update a component

Created by Alex Pop on 19 Dec 2019

Updates an existing component resource.

update(component: Component): Promise<Component>

Returns

A Promise that will resolve with a Component object.

Example

existingComponent.description['en-GB'] = 'UK address component';

client.components.update(existingComponent)
  .then(result => {      
    console.log('API call result: ', result);              
  })
  .catch(error => {
    console.log('API call fetch error: ', error);      
  });