An alternative backlinks plugin, which displays relevant and formatted excerpts from notes with linked mentions, based on the position of mentions in the notes' hierarchical structure (bullet level indentation).
[x] - const _file = file instanceof TFile ? file : null I think you only want to trigger the callbacks if file is an instance of TFile, right? I think you want to wrap this in an if statement instead of using the ternary.
[x] - Math.random().toString Why not just use the file path or something deterministic for the id? Math.random isn't really a good fit for a UUID.
[x] - const callback I think you can move this into the useEffect.