Sheraff / react-continuous-portal

Home Page:https://Sheraff.github.io/react-continuous-portal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-continuous-portal

Screen.Recording.2022-06-19.at.20.42.15.mov

Easy to use createPortal component (<Portal/>) that never unmounts when changing the destination (<Receptacle/>). Plus, even the destination can pass props.

function() {
  const fragment = useFragment('div')
  return (
    <>
      <Portal fragment={fragment}>
        <video src="" />
      </Portal>
      <Receptacle fragment={fragment} />
    </>
  )
}

About

https://Sheraff.github.io/react-continuous-portal


Languages

Language:JavaScript 67.5%Language:HTML 28.0%Language:CSS 4.5%