-
Notifications
You must be signed in to change notification settings - Fork 493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to bring popups into the same context as the rest of the app? #1257
Comments
Is there anything I can do in order to get a response on this issue? Sorry if the issue somehow malformed... |
I've implemented a way to provide a wrapper function to achieve the desired behaviour. Feel free to take a look: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReactXP seems to have this sort of top level component layout:
My App has the following layout:
The BrowserRoute component (from react-router) internally uses react's context infrastructure to make routing/navigation primitives accessible to child components deep down the tree, without explicitly passing them around as props.
If I want to display a popup which has a link for navigating to a different route, the
<Link>
or any routing related component relies on being a descendent of the original<BrowserRouter>
component which defines the shared context. With the ReactXP setup, however, popups are rendered outside of the<App>
, and thus don't have access to the shared context established by<BrowserRouter>
.I tried to search for a way to wrap the whole RootView in a context, or somehow inject additional context into PopupContainerView, but could not find any APIs that would allow me to do this. What is the recommended way for handling this issue?
Thank you!
The text was updated successfully, but these errors were encountered: