Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Implement createPortal(). Fixes #452. #486

Merged
merged 2 commits into from
Jul 13, 2018
Merged

Conversation

developit
Copy link
Member

@developit developit commented Jul 11, 2018

Needs a test or two.

Note: this does not implement event bubbling redirection, since doing so would be rather difficult in Preact.

Needs a test or two.
Copy link
Member

@lukeed lukeed left a comment

Choose a reason for hiding this comment

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

We could also do this, right?

function Portal(props) {
  renderSubtreeIntoContainer(this, props.vnode, props.container);
}

The this will still pass along context

@developit
Copy link
Member Author

developit commented Jul 11, 2018

Ooooh you're right. That's a killer Preact hack ;)

@lukeed
screen shot 2018-07-11 at 7 51 38 pm

@lukeed
Copy link
Member

lukeed commented Jul 11, 2018

tumblr_mezprb2brl1rxa4z0

Copy link
Member

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

Copy link
Contributor

@k1r0s k1r0s left a comment

Choose a reason for hiding this comment

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

nice! thanks @developit

@marvinhagemeister marvinhagemeister merged commit 370161b into master Jul 13, 2018
@lukeed lukeed deleted the createportal branch July 13, 2018 19:19
@andersontr15
Copy link

Can't see this in ^3.18.0 under src/index.js. Am I missing something?

@lukeed
Copy link
Member

lukeed commented Jul 26, 2018

Looks like hasn't been published yet

@maka-io
Copy link

maka-io commented Aug 1, 2018

Any minute?

@developit
Copy link
Member Author

It's in 3.18.2.

@doxiaodong
Copy link

doxiaodong commented Aug 8, 2018

#494

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

Successfully merging this pull request may close these issues.

7 participants