Skip to content
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

Disabling async prefetching #68

Open
tastyeggs opened this issue Jul 22, 2014 · 0 comments
Open

Disabling async prefetching #68

tastyeggs opened this issue Jul 22, 2014 · 0 comments

Comments

@tastyeggs
Copy link

How do I go about disabling prefetch of async components? Typically my async components show some kind of a spinner, along with other contextual elements when state is being fetched.

Ever since I integrated in this router, this no longer happens, and it looks like the state is being prefetched in AsyncRouteRenderingMixin.

Can this be disabled using a prop?

Currently I'm monkey patching this:
var AsyncRouteRenderingMixin = require('react-router-component/lib/AsyncRouteRenderingMixin');
function AsyncRouteRenderingMixin_setRoutingState(state,cb) {
this.replaceState(state, cb);
}
if (AsyncRouteRenderingMixin.setRoutingState != AsyncRouteRenderingMixin_setRoutingState) {
AsyncRouteRenderingMixin.setRoutingState = AsyncRouteRenderingMixin_setRoutingState;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant