-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
partial-app-loading example throws in updateMatchComponents when clicking around #117
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
Comments
:( That's new. Do you know if its because of the react upgrade or a change in our code? |
Guessing it was introduced in the change to make activeRoute a function (73570ed). |
Seems to have been introduced in 0177cdd, which is where the updateMatchComponents logic is introduced. |
function updateMatchComponents(matches, refs) {
var i = 0, component;
while (component = refs[REF_NAME]) {
matches[i++].component = component;
refs = component.refs;
}
} The while loop runs one more time then there are matches. |
Any progress on this or pointers on how to fix/get around it? |
A fix that seems to work for me, probably there are nicer, better, cleaner ways to get around it:
|
^ @mjackson any issues with this code you can think of? |
I haven't had time to track down this bug yet, but there's obviously something wrong with |
This happens when a handler component creates its own |
Any more progress or ways to solve this? |
as soon as we finish server-side rendering this is number one priority before v1 release. |
(but no, we haven't worked on it) |
I'm not 100% sure (because the partial-app-loading example is currently broken) but this commit may have helped resolve this bug. |
we'll need a webpack build for it |
If you wanna use webpack, I'm down. My only issues with webpack are that the docs are a wall of text which makes it difficult for me to understand how to use it. But if we're going to use it on one example, let's just use it for everything. I don't like the idea of building some stuff with Browserify and other stuff with webpack. We should always work with Browserify tho. |
Would've been nice if there was no build step for examples. Just launching |
@gaearon agree. no build step would be really nice. |
I want webpack back now that partial app loading is fixed :) |
BTW I have an exception in that loop, wonder why: Uncaught TypeError: Cannot read property 'refs' of undefined in (But that's with my own partial loading, which worked in 0.9.3 but broke in master) |
I have an okay understanding of webpack configuration and can probably help if you have questions. |
I'll switch it back to webpack, we still need browserify for the global build (unless webpack can do this too?) |
@gaearon it is done :)
Then just open http://localhost:8080. |
We don't find the refs where we expect them due to the way that the PreInbox and PreDashboard components work (PreInbox's owner is Dashboard instead of PreDashboard, the handler specified by the route).
The text was updated successfully, but these errors were encountered: