Bug: Portals doesn't participate in Suspense

This issue has been created since 2022-11-14.

It appears Portals does not participate in suspense. I came over this by accident, and I'm not sure if it's intended behavior or not. I could not find any documentation related to suspense and portals specifically.

React version: 18.2.0

Steps To Reproduce

  1. Create a component that can suspend, while also rendering a portal
  2. Suspend component

Link to code example:

https://codesandbox.io/s/youthful-tree-vikl09?file=/src/App.tsx

The current behavior

Portal content rendered from a suspending component is visible if the component suspends.

The expected behavior

Portal should behave like any other child and not be shown when it's under a suspense that fallbacks.

vkurchatkin wrote this answer on 2022-11-14

It seems to be unfortunate, but expected behaviour. Suspended content is hidden using display: none, which means there is no good or simple way to make this affect portals as well.

More Details About Repo
Owner Name facebook
Repo Name react
Full Name facebook/react
Language JavaScript
Created Date 2013-05-24
Updated Date 2022-12-10
Star Count 198882
Watcher Count 6638
Fork Count 41302
Issue Count 1120

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
[BitSail][Format]Use deserializationFormat replace RowBuilder 1 2022-11-09 2022-12-10
Question: is it possible to use with getStaticProps()? 16 2020-12-23 2022-12-03
argmax/argmin returns the last index instead of the first when there are equally max/min elements 1 2022-08-17 2022-08-12
Get all secrets of one auth client return the response but data is always empty 1 2021-10-15 2022-11-14
Any way to stream specific window name? 0 2022-01-10 2022-10-30
Remove auto generated UUID from image 2 2021-08-06 2022-10-12
Question: New ioBroker Docker-Image for Synology with admin5 adapter 4 2021-08-16 2022-12-09
Add a new GIF in the Readme.md 13 2021-09-30 2022-11-05
Typo in `vetiver_pin_write()` 0 2021-10-20 2022-11-21
Reference data includes bwa indices under incorrect name 2 2019-05-28 2022-11-20
cmp will be depreciated 0 2021-01-12 2022-11-08
Card control hover and click 0 2022-10-27 2022-12-02
(Feature request) Ability to export only non-default shortcuts 4 2017-01-12 2022-11-10
VirusTotal detects Cyren - W64/Bulz.BI.gen!Eldorado for v2.4 installer 4 2021-10-24 2022-09-21
Providing hash_extra for local_existing_package 7 2021-03-08 2022-11-05
Capture the current page's width in page change evt ? 1 2021-04-19 2022-10-16
Transport Encryption: certificates not selectable 1 2021-04-29 2022-11-17
Genres loading slowly 0 2022-01-21 2022-11-09
BUG: arrayContains pass the test with any value 0 2020-10-30 2022-07-27
BUG: spatial_colors PR broke an example 1 2022-09-09 2022-11-10
Simulator - Trigger Command - item.rc 5 2021-12-08 2022-12-09
k8s_external plugin doesn't work with AWS ELB/NLB with query=SRV 3 2021-10-19 2022-11-09
Error: Failed to construct REST client 7 2021-05-04 2022-12-06
problem for the print staement in the while loop 2 2022-10-12 2022-10-21
Playback queue ended Trigger twice 6 2021-08-25 2022-11-03
[Docs] Unclear how to interact with sandbox cloud-based kubernetes cluster deployment 2 2021-12-13 2022-11-25
[BUG] task runtime isn't always available/reported 3 2021-12-13 2022-10-17
【每日计划】 2021-12-01 10 2021-11-30 2022-01-12
【每日计划】 2021-12-03 8 2021-12-02 2022-01-12
【每日计划】 2021-11-30 13 2021-11-29 2022-01-12
【每日计划】 2021-12-02 8 2021-12-01 2022-01-12
Support safari webextensions in runtime-js 2 2022-05-25 2022-10-29
Wrong scope generated with merge 1 2022-09-05 2022-12-09
Pending transaction trace 1 2021-02-24 2022-09-28
Document endpoints for managing IP whitelisting, TLS certificates and domains 3 2020-12-10 2022-10-20
Feature Suggestion: Colorize the output of docker 2 2022-01-05 2022-11-19
Replace arrow selectors with too many choices with a better selection menu 4 2021-11-16 2022-11-20
Add .gitignore 8 2018-05-10 2021-11-13
Missing __init__.py causes inconsistent failure and confusing error message 1 2022-01-31 2022-10-04
Publish command tags HEAD instead of artifact commit ID 0 2022-05-19 2022-10-19
Asset transfer pallet 2 2021-11-23 2022-12-03
Separate admin domain (XSS prevention) vs. preview 0 2022-05-16 2022-05-31
Support inlay hint text edits 0 2022-08-09 2022-09-08
Is pose refinement code avaiable? 0 2020-04-16 2022-09-08
install docker-compose using DEB/RPM official package 1 2022-07-28 2022-11-16
Editor: preferences not persisting across sessions 13 2022-06-03 2022-09-28
1.23.x Release #2 0 2021-04-22 2021-10-06
[Improvement]: Elasticsearch - remove "indexType" 1 2021-11-23 2022-12-03
Merge `Aggregator` and `AggregatorBase` abstract classes 1 2022-11-01 2022-11-21
how to use --enable-shared ? 6 2021-07-29 2022-11-10