R
Reactiflux

✅ – kairu – 16-47 Oct 31

✅ – kairu – 16-47 Oct 31

Cchocokai10/31/2022
is there a better way to do
JSON.parse(JSON.stringify(localStorage.getItem('user')))
JSON.parse(JSON.stringify(localStorage.getItem('user')))
?
LLouis10/31/2022
Why do you need to stringify the value in local storage? It's a key value pair so I imagine you'd be storing a stringified JSON object as the value here anyway
Cchocokai10/31/2022
it wouldn't let me parse through it without running stringify then parse and saving the object in local storage would only return object Object
LLouis10/31/2022
You should stringify it before persisting it and parse it after retrieving it
Cchocokai10/31/2022
OK i'll that that real quick
UUUnknown User10/31/2022
2 Messages Not Public
Sign In & Join Server To View
LLouis10/31/2022
Awesome meowthumbsup
UUUnknown User11/1/2022
Message Not Public
Sign In & Join Server To View

Looking for more? Join the community!

R
Reactiflux

✅ – kairu – 16-47 Oct 31

Join Server