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

Announcment: No Vue 3 support planned, use native <teleport> instead #56

Open
LinusBorg opened this issue Dec 22, 2020 · 2 comments
Open

Comments

@LinusBorg
Copy link
Owner

Vue 3 introduced <teleport>, a feature which was very much inspired by the functionality provided by this library.

It does everything this library does, but better and without any caveats or hacks, as the moving of the DOM is implemented directly in Vue 3's renderer.

For that reason, this library will not be ported to Vue 3. The migration path is pretty straightforward:

Vue 2 & vue-simple-portal

<portal selector="#portal-target">
  <p>This will be mounted as a child element
    of <div id="portal-parget"> instead of
    somewhere inside the child tree of <div id="app">
  </p>
</portal>

Vue 3

<teleport to="#portal-target">
  <p>This will be mounted as a child element
    of <div id="portal-parget"> instead of
    somewhere inside the child tree of <div id="app">
  </p>
</teleport>
@LinusBorg LinusBorg pinned this issue Dec 22, 2020
@LinusBorg LinusBorg changed the title Announcment: No Vue 3 support plannced, use native <teleport> instead Announcment: No Vue 3 support planned, use native <teleport> instead Dec 22, 2020
@reinink
Copy link

reinink commented Apr 2, 2021

Awesome work on this project, and the original project @LinusBorg! I've been using vue-portal for years! Fantastic to see this in Vue 3 core...no doubt in part thanks to your work. I'm happy to see that you've put together this new simpler/lighter version of vue-portal. I suspect I'll be using Vue 2 for a long time still, so this is great to have! 👍

@wobsoriano
Copy link

Still useful for projects that support both vue 2 and 3 using vue-demi

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