---
category: Reactivity
---
# toRefs
Extended [`toRefs`](https://vuejs.org/api/reactivity-utilities.html#torefs) that also accepts refs of an object.
## Usage
```ts
import { toRefs } from '@vueuse/core';
import { reactive, ref } from 'vue';
const objRef = ref({ a: 'a', b: 0 });
const arrRef = ref(['a', 0]);
const { a, b } = toRefs(objRef);
const [a, b] = toRefs(arrRef);
const obj = reactive({ a: 'a', b: 0 });
const arr = reactive(['a', 0]);
const { a, b } = toRefs(obj);
const [a, b] = toRefs(arr);
```
## Use-cases
### Destructuring a props object
```vue
```
## Type Declarations
```ts
export interface ToRefsOptions {
/**
* Replace the original ref with a copy on property update.
*
* @default true
*/
replaceRef?: MaybeRefOrGetter;
}
/**
* Extended `toRefs` that also accepts refs of an object.
*
* @see https://vueuse.org/toRefs
* @param objectRef A ref or normal object or array.
* @param options Options
*/
export declare function toRefs(
objectRef: MaybeRef,
options?: ToRefsOptions,
): ToRefs;
```