wix-incubator / react-popup-manager

Manage react popups, Modals, Lightboxes, Notifications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

withPopups clashes with forwardRef

uplight-dev opened this issue · comments

export default forwardRef(withPopups()(MyComponent));

causes the forwardRef to use a modified version of the expected MyComponent(of type ForwardFn). This breaks the forwardRef usages and doesn't allow refS to be applied correctly.

a possible workaround is to do withPopups()(ParentComponent) and pass popupManager prop to MyComponent child.