@codestacks/react-portal
v1.1.3
Published
Portal library based for Reactjs
Downloads
290
Readme
Codestacks React Portal
https://react.dev/reference/react-dom/createPortal
^1.1.0 support react >=18.0.0 <20.0.0
Features
- Pass the component to the external Dom through the portal
Install
yarn add @codestacks/react-portalUsage
add in your App.tsx
import ReactPortal from '@codestacks/react-portal';
const App = () => {
return (
<ReactPortal
id="codestacks-react-modal"
className={styles.root}
>
{item && renderDialog()}
</ReactPortal>
);
};There is also a example that you can play with it:
With application
License
MIT © Codestacks & Imagine
