flowforfrank / webtips

https://webtips.dev
1 stars 0 forks source link

force-rerender-components-in-svelte #29

Open utterances-bot opened 5 months ago

utterances-bot commented 5 months ago

How to Force Rerender Components in Svelte - Webtips

Learn how you can easily force the recreation and rerender of Svelte components with the help of key blocks.

https://webtips.dev/force-rerender-components-in-svelte

ReinerKnudsen commented 5 months ago

Seriously, this made my day. I'm learning Svelte right now following a course on Udemy. And while everything works for the instructor, my component simply didn't want to re-render. Stupid thing. But with your help I wrapped it in a key which fires, when the data for the component is changed. In the future I may figure out I was wrong in the first place. But I don't care since it works with your help. CHEERS! (Sending a virtual beer)