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

Rendering a metal component appends component to node rather than replacing node #110

Closed
bryceosterhaus opened this issue May 12, 2016 · 4 comments

Comments

@bryceosterhaus
Copy link
Member

When rending a metal component, is there a reason for appending the component to the parentElement rather than replacing the node? For our use case, it is usually better to replace the node with our metal component rather than appending it.

new MyComponent(
     {},
     parentElement
);

Just curious what the thought is behind this. Thanks!

@eduardolundgren
Copy link
Contributor

What you want is set the component element to your element:

new MyComponent(
     {
         element: elementNode
     }
);

@mairatma mairatma reopened this May 12, 2016
@mairatma
Copy link
Contributor

Oops, closed by mistake.

I just meant to confirm that we have both options, like Eduardo said. @bryceosterhaus, let us know if it covers your use case :)

@mairatma mairatma reopened this May 12, 2016
@mairatma
Copy link
Contributor

Hate this Close and comment button sometimes...

@bryceosterhaus
Copy link
Member Author

Oh gotcha, didn't notice that attr before. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants