Table of Content
Refractoring the LocalStorage module
We are going to treat the tags as data instead of string. Before that, we will refractor the storage as an individual module inside data object.
Note: we used
.call(data) so the
this inside that annonymous function refers to the
When we load the books list:
When we need to save the book list, we call the following:
What’s next? We’re going to take a look at “Planning the tags data structure”.