useAtom(undefined)
throws Invalid value used as weak map key
#2777
Unanswered
kevinschaich
asked this question in
Ideas
Replies: 2 comments 4 replies
-
cc: @dai-shi I believe you replied to a few of the issues/discussions above. |
Beta Was this translation helpful? Give feedback.
4 replies
-
Fixed in #2778 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This should be checked for or caught and re-thrown as a more helpful error message.
To Repro:
I hit this today and if it weren't for this comment I would have been very struggling for a few hours:
#1816 (reply in thread)
One potentially common way people might hit this is if they use nested/split atoms and try to reference a key that doesn't exist.
e.g. objects:
e.g. lists:
Related: #2272, #1817, #1177, #1816, #2239, #2273
Beta Was this translation helpful? Give feedback.
All reactions