odysseyscience / react-router-proxy-loader

Dynamically load react-router components on-demand, based on react-proxy-loader
145 stars 12 forks source link

Handle case where component is null #4

Closed liouh closed 9 years ago

liouh commented 9 years ago

Didn't come up in my test scenario, but best to be safe.

seanadkinson commented 9 years ago

Hmm, I think the provided component would always be the current proxy component. Not sure it would ever be null, since otherwise it wouldn't be transitioning away from it.

liouh commented 9 years ago

Not a common case, but I did get a null component when redirecting with this.replaceState() in componentWillMount. Came across it when trying workarounds for not being able to use renderUnavailable -- will open a separate discussion for that when I have enough info.

seanadkinson commented 9 years ago

We hit this in a certain case as well. I think if the user is leaving before the component finished loading or something. I'll go ahead and merge.

seanadkinson commented 9 years ago

Pushed 0.2.3