Skip to content

[BUG]: AtomWithStorage should not return initialvalue #2622

Answered by dai-shi
Pszz asked this question in Bug report
Discussion options

You must be logged in to vote

initialValue is required for the case there's no item in the storage.
I would do something like ('user_sign', undefined, { getOnInit: true }).

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Pszz
Comment options

@dai-shi
Comment options

Answer selected by Pszz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2617 on June 18, 2024 15:04.