Why Nostr? What is Njump?
2023-07-12 17:42:26
in reply to

npub106…ptw9x on Nostr: It should re-render if naddr changes but it can depend on how you've used it inside ...

It should re-render if naddr changes but it can depend on how you've used it inside List. It sounds like you might be making a mistake inside the List component. Here's an example I whipped up real quick: https://svelte.dev/repl/8f554eb6d505436f85c27203021ae1b3?version=4.0.5

If you look at List.svelte you'll notice that I've got two different ways of getting notes. One using the { notes } = naddr syntax and the other using the reactivity $: syntax. The reason the first one doesn't work is because *the script tag only runs once* when the component is mounted. Then it never runs again. Key works because it completely destroys the component and re-mounts it. Hopefully that sheds some clarity on the situation :)

If you can link me some code I can probably take a closer look 🤘
Author Public Key
npub106wfyjh9y4wftfz5629w392j58sgr7pg44xuqwq4pz6sjxyvse0qcptw9x