maisano / react-router-transition

painless transitions built for react-router, powered by react-motion
http://maisano.github.io/react-router-transition/
MIT License
2.59k stars 139 forks source link

AnimatedSwitch throws error if maximum update depth is exceeded within a HOC #107

Closed slavkobojanic closed 4 years ago

slavkobojanic commented 5 years ago

In my particular case i'm using the AnimatedSwitch within a HOC router so that i've got the ability to do public/private routes. For some context, within these public/private routes it'll check if the user is authenticated if they are, all is well and works fine, but if they are not then it'll redirect them to some arbitrary route which is where the maximum update depth is exceeded.

Not a great amount of context is provided in the console but I can certainly confirm that it's to do with the redirect (as it didn't have issues with some other arbitrary element) and also that it works fine with the Switch provided by react-router itself.

image

Here's the error log, let me know if you need any more context or anything :)

Glavin001 commented 4 years ago

@slavkobojanic : Same here. Did you find a workaround?

slavkobojanic commented 4 years ago

@Glavin001 Unfortunately not - I was not able to find a solution to this and it seems that the maintainer is not actively developing this.