Skip to content

Conversation

incerta
Copy link
Contributor

@incerta incerta commented Jul 10, 2019

#175 Router middleware

  • Add 'connected-react-router' store middleware
  • Add ConnectedRouter provider to App

@piotrwitek
Copy link
Owner

piotrwitek commented Jul 17, 2019

Hey @incerta
Thanks for your suggestion.
I'm trying to understand the benefits you have outlined but I fail to find one:

  1. How is that different from keeping providers in App component and just adding testStore as a Prop in the App component?
  2. It might make sense in larger applications, but for the sake of simplicity, I prefer to not do that.

@incerta incerta force-pushed the router-middleware branch from 85337be to 9953a74 Compare July 19, 2019 15:16
@incerta
Copy link
Contributor Author

incerta commented Jul 19, 2019

Hey @incerta
Thanks for your suggestion.
I'm trying to understand the benefits you have outlined but I fail to find one:

  1. How is that different from keeping providers in App component and just adding testStore as a Prop in the App component?
  2. It might make sense in larger applications, but for the sake of simplicity, I prefer to not do that.

I agree, this Providers abstraction approach is too specific to be presented in guideline and benefits is not obvious. I removed last commit and just add ConnectedRouter provider to App

Copy link
Owner

@piotrwitek piotrwitek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks now it looks great!

@piotrwitek piotrwitek merged commit f75a3cc into piotrwitek:master Jul 19, 2019
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.

None yet

2 participants