Skip to content

Disabling async prefetching #68

Open
@tastyeggs

Description

@tastyeggs

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions