I see this only when I'm using either withAlert or <Alert> to wrap a component inside a modal.
All other withAlert wrappers work perfectly fine in any other component.
As a comparison, in my modals, all other wrappers like withRouter, Apollo or any other wrapper can pass their props in their Consumer except for withAlert
The workaround for me has been to wrap the parent outside modal first, and then manually pass alert as a prop to the component inside modal.
I also tried mounting the modal's <Ref /> both in document.body and in the Root but still no luck.
Please let me know if there is anything else I'm missing to try out.
I see this only when I'm using either
withAlert
or<Alert>
to wrap a component inside a modal.All other
withAlert
wrappers work perfectly fine in any other component.As a comparison, in my modals, all other wrappers like
withRouter
, Apollo or any other wrapper can pass their props in theirConsumer
except forwithAlert
The workaround for me has been to wrap the parent outside modal first, and then manually pass
alert
as a prop to the component inside modal.I also tried mounting the modal's
<Ref />
both indocument.body
and in the Root but still no luck.Please let me know if there is anything else I'm missing to try out.
Thank you.