# Function setViewModel

- setViewModel(
  newViewModel: {} | ViewModel,
  options?: Partial<ViewModelUpdateOptions>,
  ): void

  #### Parameters

  - newViewModel: {} | ViewModel
  - `Optional` options: Partial<ViewModelUpdateOptions>

  #### Returns void

  #### Description

  Set the viewModel for the form or reset it by passing an empty object

  - Defined in jslib/src/lib/VerificationService/ViewModel.ts:28