useStore

For values of type RetAtom returned by useCtx hooks, you cannot use them directly and must read them with the useStore hook.

type useStore<T> = (RetAtom<T>) => T
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 });
}