piotrwitek / react-redux-typescript-guide

The complete guide to static typing in "React & Redux" apps using TypeScript
https://piotrwitek.github.io/react-redux-typescript-guide/
MIT License
13.35k stars 1.09k forks source link

Router middleware #177

Closed incerta closed 5 years ago

incerta commented 5 years ago

175 Router middleware

piotrwitek commented 5 years ago

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 commented 5 years ago

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