There is currently no good way to find everywhere a query, temp state or component is used in your app. This can make it difficult to track down bugs or refactor your app.
I have a klunky method that I use and it is at least mostly effective:
I delete the object you want to find the references of. Well, I attempt to delete it. If it does delete with no notification, it is not referenced anywhere. You can then roll back to an early version to get your object back if needed.
But if you are trying this, you know there are references and you will get a confirmation notice:
That is your list of refences! Screen cap this and you can go through them one by one to do whatever you need to do.