So I needed to transfer the routing context (I’m using react-router) from component X
to component ContactsEditDialog
, as it’s rendered in some remote area of the DOM tree (#modal
), not under the node corresponding to component X
, as usual...
So I basically replaced this...
React.withContext({ router: this.context.router }, () => {
React.render(
<ContactsEditDialog { ...this.props } { ...i18nData }/>,
document.getElementById('modal')
);