Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

vue js store and retrieve api data to localstorage

.then((res) => {
     localStorage.setItem("apiData", JSON.stringify(res.data));
});

//////// THEN YOU CAN GET DATA BY
var data = JSON.parse(localStorage.getItem("apiData"));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #vue #js #store #retrieve #api #data #localstorage
ADD COMMENT
Topic
Name
3+8 =