atomWithStorage returns null after app reload despite being saved in local storage in my Vite React app #2958
Answered
by
dai-shi
nivethan-me
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Does |
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
-
The problem is i'm using axios to send api request in my Vite app. and i need to add a jwt accesstoken to the header. it works fine until i reload the browser. i checked the localstorage both payload and accesstokens atoms are stored there. but api request sent without the token. it got logged as null
auth-atom.ts
axios.ts
Beta Was this translation helpful? Give feedback.
All reactions