13 lines
305 B
JavaScript
Executable File
13 lines
305 B
JavaScript
Executable File
export function saveStateToLocalStorage(item, pathObject) {
|
|
localStorage.setItem(
|
|
item,
|
|
JSON.stringify(pathObject)
|
|
);
|
|
}
|
|
|
|
export function getStateFromLocalStorage(item) {
|
|
let data = localStorage.getItem(item);
|
|
if (data !== undefined) {
|
|
console.log(data);
|
|
}
|
|
}; |