I’ve recently talked to @tomlarkworthy about reusable components inside Observablehq. We’ve thought webcomponents as a great way to abstract and encapsulate logic and styles while taking advantage of Observable dataflow. Then I came across this issue, @mbostock noticed back in 2019
I wonder if there is any workaround to invalidate/redefine or any hacks to improve the developer experience better than refreshing the page or recreating multiple distinct elements.
Here’s a possible solution, setting a flag that randomly modifies the custom element name on edits so you can see the updates as you work: Web Components / Observable / Observable