@acrool/react-portal
v1.1.2
Published
Portal library based for Reactjs
Readme
Acrool 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 @acrool/react-portalUsage
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:
