loadable atom doesn't have type for returned value data
and error
properties
#2731
Answered
by
dai-shi
trongthanh
asked this question in
Bug report
-
Bug DescriptionJotai 2.9.3 The returned value from a Reproduction Link |
Beta Was this translation helpful? Give feedback.
Answered by
dai-shi
Sep 13, 2024
Replies: 1 comment 3 replies
-
You can check the state and then access it. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
jotai/src/vanilla/utils/loadable.ts
Lines 17 to 20 in 9b83585
| undefined
in all Jotai code base. So, your request is not acceptable.If you want to loosen the type, you can work it around with type assertion:
https://stackblitz.com/edit/jotai-gmwmbz-rbdn9a?file=src%2FApp.tsx
It's not very cute though.