Skip to content

Commit

Permalink
Reland #28672: Remove IndeterminateComponent (#28681)
Browse files Browse the repository at this point in the history
This PR relands #28672 on top of the flag removal and the test
demonstrating a breakage in Suspense for legacy mode.

React has deprecated module pattern Function Components for many years
at this point. Supporting this pattern required React to have a concept
of an indeterminate component so that when a component first renders it
can turn into either a ClassComponent or a FunctionComponent depending
on what it returns. While this feature was deprecated and put behind a
flag it is still in stable. This change remvoes the flag, removes the
warnings, and removes the concept of IndeterminateComponent from the
React codebase.

While removing IndeterminateComponent type Seb and I discovered that we
needed a concept of IncompleteFunctionComponent to support Suspense in
legacy mode. This new work tag is only needed as long as legacy mode is
around and ideally any code that considers this tag will be excludable
from OSS builds once we land extra gates using `disableLegacyMode` flag.

DiffTrain build for [5998a77](5998a77)
  • Loading branch information
gnoff committed Apr 3, 2024
1 parent 89feb7e commit 8d925e2
Show file tree
Hide file tree
Showing 23 changed files with 3,970 additions and 4,697 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
@@ -1 +1 @@
5fcaa0a832db9573364cb73738e0a3b4cf2d27f2
5998a775194f491afa5d3badd9afe9ceaf12845e

0 comments on commit 8d925e2

Please sign in to comment.