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

[Module Listing Request]: nuxt-adaptive-teleport #1097

Open
marchantweb opened this issue Oct 25, 2024 · 0 comments
Open

[Module Listing Request]: nuxt-adaptive-teleport #1097

marchantweb opened this issue Oct 25, 2024 · 0 comments

Comments

@marchantweb
Copy link

Description

This is the module created in parallel to my "mighty bite" tip for Nuxt Nation '24.

<AdaptiveTeleport> works similarly to Vue's built-in component, but with the added benefit of being able to adapt to route changes, so it can persist children across pages without needing to re-mount them.

It works by using a watch on the route, as well as a Mutation Observer on the CSS selector for the teleport target, to know when to "refresh" the teleport instance.

The most common use case for this is for large, complex components that take a long time to mount, but that need to be within the page DOM of multiple pages. By using <AdaptiveTeleport>, you can ensure that the component is only mounted once, and is simply moved around the DOM you navigate between pages.

Thanks!

Repository

https://github.com/marchantweb/nuxt-adaptive-teleport

npm

https://www.npmjs.com/package/nuxt-adaptive-teleport

Nuxt Compatibility

Nuxt 3

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

No branches or pull requests

1 participant