Table of Content
More complex keys
Storing object in local storage makes it more useful. But that's not enough.
We can further enhnace this feature by making creative use on the key.
How about we store object's ID inside the key?
Imagine now we want to build a JavaScript based todo list.
Let's take a look at the following pseudo local storage.
Note that the colon (:) is just a notation. The key accepts string so any serialization works here. For example, you may use:
I use colon mark because it is more readable.
What’s next? We’re going to take a look at “Complex keys – Hands on exercise”.