Usage with ReadableStore
Hi
I'm very new to nanostores. Bear with me if my question/issue is trivial :).
I'm trying to use nanostores built by a third party provider (clerk, https://github.com/clerk/javascript/blob/main/packages/astro/src/stores/external.ts) in my react components. I'm following the docs from Clerk.
```
export const MyComponent: () => {
const { userId, sessionId } = useStore($userStore); // Type error
return (<div>Hello World</div>
}
```
The above gives me a type error:
```
Argument of type 'ReadableAtom<UserResource | null | undefined>' is not assignable to parameter of type 'Store'.
```
Am I missing something?
关闭于 2025-01-17 4 条评论