This is a really good tutorial. I wonder if we should add a saga option to each route that somehow kicks it off (instead of the thunk) for you. I think built-in additional support for Sagas would be great for RFR.
Though I haven’t used em in a real project in a while, Sagas I’ve found to be the the most useful async middleware approach after plain thunks. They also seem the most widely used. For example, you rarely hear about people using observables with React. I think people are just put off by chaining. I know I am. Hence sagas to the rescue.
Another option in the meantime is putting a saga key in each route yourself (you can add arbitrary keys and reuse the routesMap). It’s the same as what you have just with one less hash floating around. You can also do that with components by the way, and reuse it for your Container component.
Either way I’d love to keep improving RFR for Sagas users. I’m probably gonna start using it again myself in fact. Let’s brainstorm what else u might need. Did you use the initialDispatch option? It was created for saga users.
Also wonder if there is anything special we need for sagas with regards to SSR. Here’s the latest tutorial on the RFR SSR setup:
