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

Dynamic createElement for re-usability #3427

Closed
MMT-LD opened this issue Aug 19, 2019 · 2 comments
Closed

Dynamic createElement for re-usability #3427

MMT-LD opened this issue Aug 19, 2019 · 2 comments

Comments

@MMT-LD
Copy link

MMT-LD commented Aug 19, 2019

Is your feature request related to a problem? Please describe.
i'm trying to have a component where i can dynamically change an element from say a div to a main tag based on an as prop - i can do this in React for example?

Describe the solution you'd like
so inside one component i may have <Base as="div" /> but in another component i want to use it again but this time i want it to be main? <Base as="main" /> if that makes sense? this could then share some common styling/functionality etc....

P.S. Sorry if this should not be reported as an issue/feature request? i could not find in the docs if this is even possible...

@erzr
Copy link

erzr commented Aug 19, 2019

There has been some discussion about this here: #2324.

@Rich-Harris
Copy link
Member

Closing in favour of #2324

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