Skip to content

[Discussion] renderUnavailable is unreachable code #5

@liouh

Description

@liouh

Say I'm navigating between two react-router routes, A --> B.

Order of execution is roughly as follows:

  1. A's willTransitionFrom
  2. B's willTransitionTo (async load, go to step 3 via callback when complete)
  3. A's componentWillUnmount
  4. B's componentWillMount, render, ...etc

The proxy render logic calls renderUnavailable if the component has not yet loaded. In react-proxy-loader, this works because render can happen before the component is downloaded. However, with the new requirement of waiting for willTransitionTo, the component will always be loaded by the time render is called.

On slower connections, this results in a period of time where the page appears to hang while the new component is downloaded (no visual feedback to confirm user interaction).

Any thoughts on the best way to communicate this loading process?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions