File tree Expand file tree Collapse file tree 3 files changed +33
-1
lines changed
Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * Copyright (c) Facebook, Inc. and its affiliates.
3+ *
4+ * This source code is licensed under the MIT license found in the
5+ * LICENSE file in the root directory of this source tree.
6+ *
7+ * @emails react-core
8+ */
9+
10+ 'use strict' ;
11+
12+ describe ( 'ReactDOMInReactServer' , ( ) => {
13+ beforeEach ( ( ) => {
14+ // In RSC this will be aliased.
15+ jest . mock ( 'react' , ( ) => require ( 'react/react.shared-subset' ) ) ;
16+ require ( 'react' ) ;
17+ } ) ;
18+
19+ it ( 'can require react-dom' , ( ) => {
20+ require ( 'react-dom' ) ;
21+ } ) ;
22+ } ) ;
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ const fakeInternalInstance = {};
8383
8484// React.Component uses a shared frozen object by default.
8585// We'll use it to determine whether we need to initialize legacy refs.
86- export const emptyRefsObject : $FlowFixMe = new React . Component ( ) . refs ;
86+ export const emptyRefsObject : $FlowFixMe = React . Component ? new React . Component ( ) . refs : { } ;
8787
8888let didWarnAboutStateAssignmentForComponent ;
8989let didWarnAboutUninitializedState ;
Original file line number Diff line number Diff line change 1+ /**
2+ * Copyright (c) Facebook, Inc. and its affiliates.
3+ *
4+ * This source code is licensed under the MIT license found in the
5+ * LICENSE file in the root directory of this source tree.
6+ *
7+ * @flow
8+ */
9+
10+ export * from './src/ReactSharedSubset.experimental' ;
You can’t perform that action at this time.
0 commit comments