@winglet/react-utils
Version:
React utility library providing custom hooks, higher-order components (HOCs), and utility functions to enhance React application development with improved reusability and functionality
12 lines (8 loc) • 394 B
JavaScript
var jsxRuntime = require('react/jsx-runtime');
var react = require('react');
var PortalContextProvider = require('./context/PortalContextProvider.cjs');
const withPortal = (Component) => {
return react.memo((props) => (jsxRuntime.jsx(PortalContextProvider.PortalContextProvider, { children: jsxRuntime.jsx(Component, { ...props }) })));
};
exports.withPortal = withPortal;
;