AsyncProps error: Cannot read property 'componentsArray' of undefined
Hey, thanks for your ongoing work in this repo! It's been a huge help to me so far.
I'm using the latest version with AsyncProps to scaffold a new app, and am running into the same issue described here: https://github.com/rackt/react-router/issues/1511
Did you run across anything similar when setting this up?
My first thought was that it might have something to do with the way my Routes load their components:
<Route component={Main}>
<Route path="/" component={Projects}/>
</Route>
loadProps is called on Main and returns a value, which is then not accessible in Projects. Maybe I'm not passing it down correctly?
Would love to hear if this looks familiar. Thanks!
I probably saw that multiple times, but it's been a few days so I can't remember specific causes, sorry.
AsyncProps will only set props on the component which owned the corresponding loadProps method, so you would need to pass it down manually from Main to Projects using React.cloneElement(this.props.children, ...)
Edit: reading the the linked react-router issue again - it's not documented anywhere, but I think AsyncProps has a hard dependency on parent-based context from 0.14. I just pushed 1dd873f, which is where I'm up to. It seems a bit broken, I don't know it that's my fault or just because it's still experimental.
Thanks! Sounds like AsyncProps might be a dealbreaker for my use-case with a 0.14 dependency.
Appreciate the help :)