---
title: useStore
summary: Introduces the `useStore` hook for reading `RetAtom` values returned by `useCtx`.
---

# useStore

> For values of type `RetAtom` returned by [useCtx hooks](/en/miniapp/solution-ai/ability/camera-solution/ipc/fusion-player/api/01-instance), you cannot use them directly and must read them with the `useStore` hook.


```tsx
type useStore<T> = (RetAtom<T>) => T
```


```tsx
import { useCtx, useStore } from '@ray-js/ipc-player-integration';

export function Component() {

  const deviceId = '1234567890xxxxxx';
  const instance = useCtx({
    devId: deviceId
  })
  // Use useStore to read screenType
  const { screenType } = useStore({ screenType: instance.screenType });
}
```
