0
locoalstorage.getItem or save my array
Why is locoalstorage.getItem in savedPokemon function not saving my capturedPokemon array when I refresh? Any tips? Here is my code: https://code.sololearn.com/Wa1484a5A10a
3 Answers
+ 1
Well, atleast in sololearn you can't acess local storage.
+ 1
Use firebase db
https://code.sololearn.com/WXd7HMYvKfkh/?ref=app
0
To be clear, localStorage can't be access via Sololearn android app, but localStorage can access when using Sololearn website and Sololearn iOS app.
To get the result you want you need to add some extra logic to the savedPokemon function and you should save the array capturedPokemon to localStorage right after every push to capturedPokemon.
https://code.sololearn.com/Wa14a253A20a/#