Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow attaching multiple App instances to different DOM nodes #226

Open
MaxDesiatov opened this issue Jul 29, 2020 · 0 comments
Open

Allow attaching multiple App instances to different DOM nodes #226

MaxDesiatov opened this issue Jul 29, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@MaxDesiatov
Copy link
Collaborator

This is a follow-up to #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 Scenes, but I'm not sure how exactly that would look.

@MaxDesiatov MaxDesiatov added the enhancement New feature or request label Jul 29, 2020
@MaxDesiatov MaxDesiatov changed the title Allow multiple DOMRenderer instances to attach multiple apps Allow attaching multiple apps to different DOM nodes Jul 29, 2020
@MaxDesiatov MaxDesiatov changed the title Allow attaching multiple apps to different DOM nodes Allow attaching multiple App instances to different DOM nodes Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant