---
category: Elements
---
# useMutationObserver
Watch for changes being made to the DOM tree. [MutationObserver MDN](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver)
## Usage
```vue
Hello VueUse
```
## Type Declarations
```ts
export interface UseMutationObserverOptions
extends MutationObserverInit,
ConfigurableWindow {}
/**
* Watch for changes being made to the DOM tree.
*
* @see https://vueuse.org/useMutationObserver
* @see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver MutationObserver MDN
* @param target
* @param callback
* @param options
*/
export declare function useMutationObserver(
target:
| MaybeComputedElementRef
| MaybeComputedElementRef[]
| MaybeRefOrGetter,
callback: MutationCallback,
options?: UseMutationObserverOptions,
): {
isSupported: ComputedRef
stop: () => void
takeRecords: () => MutationRecord[] | undefined
}
export type UseMutationObserverReturn = ReturnType
```