Skip to content

Rapid successive calls to unloaded cache/resource items in Suspense results in a silent lockup #14097

@tannerlinsley

Description

@tannerlinsley

Do you want to request a feature or report a bug?
Report a bug

What is the current behavior?
When using Suspense, triggering several very-rapid non-cache hits locks up the nearest parent Suspense component until it is remounted.

If the current behavior is a bug, please provide the steps to reproduce

  • Visit https://codesandbox.io/s/00ml9vl9qv
  • Open Devtools to show the Network inspector
  • Click a post to view
  • Click the “Next” button (or focus it with your keyboard)
  • Press space bar multiple times very quickly (6 should do)
  • Inspect the network tab. You'll find that some of the later posts requests did not happen at all and that any further post requests made will also not be called.

What is the expected behavior?
All cache/resource requests should be called regardless of how quickly or how many pending requests are currently inflight.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
React: 16.7.0-alpha.0
Browser: 70.0.3538.77 (Official Build) (64-bit)
OS: MacOS Mohave 10.14

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions