0

Routing with react-router, redux and redux-saga entails a lot of repeated code, just have a look here. 21 lines for a single route. In my app I have dozens of routes, so it is very important to DRY it out somehow. Otherwise this file routes.js will be a mess with 1000+ lines.

Any ideas?

Yan Takushevich
  • 1,843
  • 2
  • 18
  • 23

1 Answers1

0

Finally I came to this. It works fine and helps to make one route declaration just 4 lines for simple routes and 8 for those using sagas and childRoutes.

Yan Takushevich
  • 1,843
  • 2
  • 18
  • 23