# Function: useDerived()

> **useDerived**\<`Value`\>(`derived`): `Value`

Subscribes a React component to a value created with [derive](./derive.md).

```tsx
import { adapt, derive, useDerived } from '@state-adapt/react';

const priceStore = adapt(20);
const quantityStore = adapt(3);

const deriveTotal = derive(() => priceStore() * quantityStore());

function Total() {
  const total = useDerived(deriveTotal);

  return <p>Total: {total}</p>;
}
```

`deriveTotal` is computed once per change, no matter how many components
subscribe.
