Skip to content
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

Add "omitRouter" option #421

Merged
merged 2 commits into from
Sep 12, 2020
Merged

Conversation

blackarctic
Copy link
Contributor

@blackarctic blackarctic commented May 18, 2020

This allows for the following configuration:

Screen Shot 2020-05-18 at 1 35 35 PM

Currently, my team is running into this situation where Router is provided at a higher point in the architecture and we want to use connected-react-router with our Redux store, but we need connected-react-router to use the Router instance that is higher up the tree instead of providing its own.

This option is added as opt-in only and should not affect any existing usage.

@blackarctic
Copy link
Contributor Author

@supasate Anything I can do to help this along?

@blackarctic
Copy link
Contributor Author

Until this is merged, I have a fork of this package up at https://www.npmjs.com/package/@blackarctic/connected-react-router

@blackarctic
Copy link
Contributor Author

Bump

@supasate
Copy link
Owner

@blackarctic. Sorry for delayed response. Is your higher-level Router a React Router? If no, it would be out of scope of this package that intends for using with React Router. If yes, I would like to understand a bit more why you can't use ConnectedRouter instead of that React Router.

@blackarctic
Copy link
Contributor Author

We are using Webpack 5 module federation. Thus the React Router is in the host application but each app is using its own Redux store with its own connected-react-router instance.

@supasate
Copy link
Owner

supasate commented Sep 3, 2020

That sounds good to me. Would you mind adding a comment telling the use case of this option? So, other people can understand its purpose.

@blackarctic
Copy link
Contributor Author

Sure. Preference on where?

@supasate
Copy link
Owner

LGTM. Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants