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

Portal #1820

Merged
merged 11 commits into from
Oct 9, 2023
Merged

Portal #1820

merged 11 commits into from
Oct 9, 2023

Conversation

maccesch
Copy link
Contributor

@maccesch maccesch commented Sep 30, 2023

Previous discussion: Synphonyte/leptos-use#18

This adds the <Portal> component. This resembles the Solid implementation quite closely.

I didn't implement the the special case for when the target is the <head> because for that we already
have leptos_meta.

Any feedback is highly welcome.

@maccesch maccesch changed the title WIP: Portal Portal Oct 1, 2023
@gbj gbj mentioned this pull request Oct 2, 2023
10 tasks
Copy link
Collaborator

@gbj gbj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks really good! I appreciate the example, as I've never really understood what portals are for.

I like that you added a test, as well.

leptos/Cargo.toml Show resolved Hide resolved
leptos/src/portal.rs Outdated Show resolved Hide resolved
@maccesch maccesch requested a review from gbj October 7, 2023 15:18
@gbj
Copy link
Collaborator

gbj commented Oct 9, 2023

Thanks!

@gbj gbj merged commit 4251f6c into leptos-rs:main Oct 9, 2023
57 checks passed
@rakshith-ravi
Copy link
Collaborator

Ooooh. We portal now! Thanks a lot @maccesch

@maccesch maccesch deleted the portal branch October 9, 2023 23:46
@maccesch
Copy link
Contributor Author

maccesch commented Oct 9, 2023

@gbj Thank you!

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

Successfully merging this pull request may close these issues.

3 participants