Local storage issueView other answers to this thread
3.4K+ developers have started their personal blogs on Hashnode in the last one month.
Write in Markdown · Publish articles on custom domain · Gain readership on day zero · Automatic GitHub backup and more
In the following line:
where does the value for
nextNotes come from? When you call the
addItem function, you do not pass any argument for
You push the new note to the
notes array but you store
nextNotes in the local storage afterwards.
Don't you mean:
I had a look on your code on GitHub. The problem is your
local-storage.js you export an object with a
remove method. So when you call
localStorage.getItem in your file above, there are no function with these names.
You have to call
But there are also othere bugs you will get when you fix this one.