I am building a note-taking app where you can add tags to notes. When a user starts adding a new tag, I want to autosuggest the tag from all of its previous saved tags. How do I implement that? Do I request for the user's every previously saved notes, get tags and compare them with what the user is typing or do I maintain a collection of tags when the user is adding a note? What is the correct approach and how do we decide?
You have 2 options: