Skip to content

Commit f1338f8

Browse files
rickhanloniiacdlite
authored andcommittedApr 26, 2024··
Export React.act from 18.3
1 parent d6c42f7 commit f1338f8

File tree

6 files changed

+6
-1
lines changed

6 files changed

+6
-1
lines changed
 

‎packages/react-reconciler/src/__tests__/ReactIsomorphicAct-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('isomorphic act()', () => {
2020
ReactNoop = require('react-noop-renderer');
2121
DiscreteEventPriority = require('react-reconciler/constants')
2222
.DiscreteEventPriority;
23-
act = React.unstable_act;
23+
act = gate(flags => flags.variant) ? React.act : React.unstable_act;
2424
});
2525

2626
beforeEach(() => {

‎packages/react/index.classic.fb.js

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
export {
1111
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
12+
act,
1213
act as unstable_act,
1314
Children,
1415
Component,

‎packages/react/index.experimental.js

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
export {
1111
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
12+
act,
1213
act as unstable_act,
1314
Children,
1415
Component,

‎packages/react/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export type ChildrenArray<+T> = $ReadOnlyArray<ChildrenArray<T>> | T;
3333
// We can't use export * from in Flow for some reason.
3434
export {
3535
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
36+
act,
3637
act as unstable_act,
3738
Children,
3839
Component,

‎packages/react/index.modern.fb.js

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
export {
1111
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
12+
act,
1213
act as unstable_act,
1314
Children,
1415
Component,

‎packages/react/index.stable.js

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
export {
1111
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
12+
act,
1213
act as unstable_act,
1314
Children,
1415
Component,

2 commit comments

Comments
 (2)

aris12391 commented on Jun 18, 2024

@aris12391

Yes

SaharanyD3van commented on Sep 8, 2024

@SaharanyD3van

Yes

Please sign in to comment.