-
-
Save parzibyte/49d637c8363a003e0c058c1c83e53757 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const CLAVE_LOCALSTORAGE = "lista_tareas"; | |
const obtenerTareasDeAlmacenamiento = () => { | |
const posibleLista = JSON.parse(localStorage.getItem(CLAVE_LOCALSTORAGE)); | |
if (posibleLista) { | |
return posibleLista; | |
} else { | |
return []; | |
} | |
}; | |
const guardarTareasEnAlmacenamiento = () => { | |
localStorage.setItem(CLAVE_LOCALSTORAGE, JSON.stringify(tareas)); | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment