mirror of
https://github.com/facebook/react.git
synced 2026-02-24 04:33:04 +00:00
Enable suspenseCallback on React Native (#29210)
## Summary suspenseCallback feature has proved to be useful for FB Web. Let's look at enabling the feature for the React Native build. ## How did you test this change? Will sync the react changes with a React Native build and will verify that performance logging is correctly notified of suspense promises during the suspense callback.
This commit is contained in:
@@ -46,7 +46,7 @@ describe('ReactSuspense', () => {
|
||||
|
||||
// Warning don't fire in production, so this test passes in prod even if
|
||||
// the suspenseCallback feature is not enabled
|
||||
// @gate www || !__DEV__
|
||||
// @gate enableSuspenseCallback || !__DEV__
|
||||
it('check type', async () => {
|
||||
const {PromiseComp} = createThenable();
|
||||
|
||||
@@ -71,7 +71,7 @@ describe('ReactSuspense', () => {
|
||||
await expect(async () => await waitForAll([])).toErrorDev([]);
|
||||
});
|
||||
|
||||
// @gate www
|
||||
// @gate enableSuspenseCallback
|
||||
it('1 then 0 suspense callback', async () => {
|
||||
const {promise, resolve, PromiseComp} = createThenable();
|
||||
|
||||
@@ -98,7 +98,7 @@ describe('ReactSuspense', () => {
|
||||
expect(ops).toEqual([]);
|
||||
});
|
||||
|
||||
// @gate www
|
||||
// @gate enableSuspenseCallback
|
||||
it('2 then 1 then 0 suspense callback', async () => {
|
||||
const {
|
||||
promise: promise1,
|
||||
@@ -145,7 +145,7 @@ describe('ReactSuspense', () => {
|
||||
expect(ops).toEqual([]);
|
||||
});
|
||||
|
||||
// @gate www
|
||||
// @gate enableSuspenseCallback
|
||||
it('nested suspense promises are reported only for their tier', async () => {
|
||||
const {promise, PromiseComp} = createThenable();
|
||||
|
||||
@@ -177,7 +177,7 @@ describe('ReactSuspense', () => {
|
||||
expect(ops2).toEqual([new Set([promise])]);
|
||||
});
|
||||
|
||||
// @gate www
|
||||
// @gate enableSuspenseCallback
|
||||
it('competing suspense promises', async () => {
|
||||
const {
|
||||
promise: promise1,
|
||||
|
||||
@@ -80,7 +80,7 @@ export const enableScopeAPI = false;
|
||||
export const enableServerComponentLogs = true;
|
||||
export const enableSuspenseAvoidThisFallback = false;
|
||||
export const enableSuspenseAvoidThisFallbackFizz = false;
|
||||
export const enableSuspenseCallback = false;
|
||||
export const enableSuspenseCallback = true;
|
||||
export const enableTaint = true;
|
||||
export const enableTransitionTracing = false;
|
||||
export const enableTrustedTypesIntegration = false;
|
||||
|
||||
Reference in New Issue
Block a user