-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infinite routing loop on Darien classroom edit page #81
Comments
Infinite looping, whaaa? 😱 Righto, I'll look into this and return with further comments. So to be clear, if I access e.g. |
Yep, and your laptop won't be happy about it. |
My current guess is that the infinite loop is less about the React router, and more to do with Observe this code:
In Scenario A, I am at the Classroom listing, and then I click (navigate to) Edit Classroom. In Scenario B, I access the Edit Classroom link directly This seems to ignite Actions.getProgram() on a nigh perpetual basis. I'm still investigating this though, as - if my guess is correct - I'm not sure how this would be fixed. Side note: The infinite loop has also been detected on the Edit Classroom (I2A), but on a very rare basis. |
React Router 4's declarative routing strikes again. This time I don't quite understand why it's broken or how to fix it.
Discovered while working on #80, if you navigate directly to the edit page of a classroom belonging to the Darien program, then the router ends up in an infinite loop and crashes the site. This is bad, heh. It works fine if you navigate via the links from the classrooms list. I'm not sure why this is broken for Darien classrooms because this doesn't happen for I2A.
While trying to work on this I realized that Darien wouldn't want that same classroom edit page design because it's still hard coded for the I2A uses. I think I was overly ambitious with trying to make some of these components shared between the two. The programs have distinct view and routing needs, so I think we have a few options:
@shaunanoordin I'd appreciate your thoughts since this affects a lot of the direction of the Darien development.
The text was updated successfully, but these errors were encountered: