Skip to content

Commit

Permalink
πŸ— [bento] Add portals to preact compat (#33213)
Browse files Browse the repository at this point in the history
* Add portals to preact compat

* Update container type per review comments
  • Loading branch information
krdwan committed Mar 17, 2021
1 parent 2b16c5b commit 6cd2f7b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/preact/compat.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,12 @@ import * as compat from /*OK*/ 'preact/compat';
export function forwardRef(fn) {
return compat.forwardRef(fn);
}

/**
* @param {PreactDef.VNode} vnode
* @param {HTMLElement} container
* @return {PreactDef.VNode}
*/
export function createPortal(vnode, container) {
return compat.createPortal(vnode, container);
}

0 comments on commit 6cd2f7b

Please sign in to comment.