Tokamak
Tokamak copied to clipboard
Allow attaching multiple `App` instances to different DOM nodes
This is a follow-up to https://github.com/swiftwasm/Tokamak/issues/224. I think we could introduce a new API within the TokamakDOM
module (though in theory it could work with any renderer as long as they don't rely on anything singleton-ish in a disruptive way):
extension App {
func _render(in: JSObjectRef) {
// ...
}
}
This would allow attaching multiple App
instances in different places of your DOM tree to allow incremental rewrites from other frameworks to Tokamak.
An alternative API for this could be based on custom Scene
s, but I'm not sure how exactly that would look.