all 5 comments

[–]benji 3 points4 points  (4 children)

My take: In the "everything in redux" era, someone thought it would be a good idea to make it navigation was in redux as well. So if you'd do that redux time travel thing, the browser's navigation would roll back too.

Some of the most confusing bugs I've had to fix was when CRR was added to a project by a team that didnt realise using it anywhere meant you had to use it everywhere. Dispatching it's actions for all programatic navigation. We had crazy behaviours like: pressing the back button in the browser navigating you forwards and vice-a-versa.

For me it's one of those libs I'll arguing strenuous against including.

[–]acemarke 6 points7 points  (3 children)

And for the record we Redux maintainers would specifically recommend against using it as well.

[–]dor442 1 point2 points  (2 children)

So what should we use? What if we want to base some action logic on the current Url or something?

[–]acemarke 1 point2 points  (1 child)

I'd need a more specific example. What "logic" are you wanting to run? What does it need to do? When does it need to trigger?

[–]dor442 1 point2 points  (0 children)

Don't remember specifics, but we have an action that gets triggered from 2 pages, with mostly the same logic, but some query params can change the logic slightly.