@acrool/react-portal
v1.0.3
Published
Portal library based for Reactjs
Downloads
350
Maintainers
Readme
Acrool React Portal
https://react.dev/reference/react-dom/createPortal
Features
- Pass the component to the external Dom through the portal
Install
yarn add @acrool/react-portal
Usage
add in your App.tsx
import ReactPortal from '@acrool/react-portal';
const App = () => {
return (
<ReactPortal
id="acrool-react-modal"
className={styles.root}
>
{item && renderDialog()}
</ReactPortal>
);
};
There is also a example that you can play with it: