Suspense component should only capture if fallback prop is defined
See original GitHub issue[Edit by @acdlite: Decided in comments below that we will change the semantics so that a missing fallback prop means the exception should propagate to the next parent (like a rethrow). That way a Suspense component can specify other props like maxDuration without needing to provide a fallback, too.]
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
<React.Suspense> does not warn you if you omit a fallback). While redundant for TS/Flow usage, I misspelled the fallback prop by accident in a playground and was tearing my hair out trying to figure out why things were not working as expected.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn’t have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:
Omit a fallback.
What is the expected behavior?
React should warn during development if fallback is undefined.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
Master
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (5 by maintainers)

Top Related StackOverflow Question
Hi, I am having an issue:
We use this with react-router and we expect to keep our main page by not using the
fallbackprops. Unfortunatly, the flow makes the first route unmounted.I know this is very common scenario, does anybody have a recommendation to share for doing this?
Thanks in advance,
Yea, that’s probably what we should do.
With the
displayPriorityfield it will be important to be able to add priority hints to these things without a fallback.