Finding usages and reference sometimes can be hard enough even if we use named exports due to renames, index
files, re-imports, re-exports. I know that most modern editors can do that, but still, your code editor won’t
show you all usages of an entity if it was re-imported or re-exported, even worse if it happened a couple
of times. By that time you’re likely already forgot what you were looking for. I think this is bad too,
but export default is worse.
Things get harder if you’re trying to find something that has no name. Yeah,
your editor can (probably) still show you references of this object, but good look trying to find it
in an organization (across multiple repositories, projects, libraries).
You can’t really rely on a filename
or path either.
Even if this would be possible, it would take too much time to bother doing so.
To make things worse and just for fun, name your file something super generic like `list.js` and import/export
it a couple of times for good measure, so that the person looking for its usages will definitely abandon all
hope.
One time, I was refactoring a component which was default exported and when I searched where it was used, one result wasn’t shown in the search. Because it had a typo. I knew this only because I also searched for its filename, because I wanted to be extra sure.