hexops / vecty

Vecty lets you build responsive and dynamic web frontends in Go using WebAssembly, competing with modern web frameworks like React & VueJS.
BSD 3-Clause "New" or "Revised" License
2.8k stars 144 forks source link

Investigate / try eliminating `nil` -> `noscript` conversion #143

Open slimsag opened 7 years ago

pdf commented 7 years ago

My notes for when we decide to tackle this:

The slightly curly bit here is vecty.Rerender(), since we don't currently know where to insert the new DOM node for the case where the re-rendered component output transitions from nil->*HTML (and we'd need a separate flag to determine first-render status). A possible solution might be to store a reference to the next DOM node, but while I would like to sort this out at some stage, it's somewhat low-priority I think.

slimsag commented 6 years ago

I'm tagging this as a breaking change because users could rely on the fact that we output <noscript> tags (but hopefully they don't).

I think we don't have to solve this issue for 1.0.0, but we do need to explicitly document Component.Render as not strictly outputting a <noscript> tag as it mentions today: https://godoc.org/github.com/gopherjs/vecty#Component