# useStoreSelector

<!-- https://uncage.vercel.app/docs/api/react/functions/usestoreselector/ -->

```ts
function useStoreSelector<T>(selector): T;
```

Defined in: react/src/hooks.ts:43

Subscribes to one slice of the store. The selector must return a value that is referentially
stable while the slice is unchanged (a stored field, not a freshly built object).

## Type Parameters

| Type Parameter |
| ------ |
| <a id="type-parameter-t"></a> `T` |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `selector` | (`s`) => `T` |

## Returns

`T`
