@@ -15,7 +15,6 @@ import {
15
15
enableBinaryFlight ,
16
16
enablePostpone ,
17
17
enableTaint ,
18
- enableServerComponentKeys ,
19
18
enableRefAsProp ,
20
19
enableServerComponentLogs ,
21
20
} from 'shared/ReactFeatureFlags' ;
@@ -681,9 +680,6 @@ function renderFragment(
681
680
}
682
681
}
683
682
}
684
- if (!enableServerComponentKeys) {
685
- return children ;
686
- }
687
683
if (task.keyPath !== null) {
688
684
// We have a Server Component that specifies a key but we're now splitting
689
685
// the tree using a fragment.
@@ -724,9 +720,6 @@ function renderClientElement(
724
720
key : null | string ,
725
721
props : any ,
726
722
) : ReactJSONValue {
727
- if ( ! enableServerComponentKeys ) {
728
- return [ REACT_ELEMENT_TYPE , type , key , props ] ;
729
- }
730
723
// We prepend the terminal client element that actually gets serialized with
731
724
// the keys of any Server Components which are not serialized.
732
725
const keyPath = task . keyPath ;
@@ -875,7 +868,7 @@ function createTask(
875
868
if ( typeof model === 'object' && model !== null ) {
876
869
// If we're about to write this into a new task we can assign it an ID early so that
877
870
// any other references can refer to the value we're about to write.
878
- if ( enableServerComponentKeys && ( keyPath !== null || implicitSlot ) ) {
871
+ if ( keyPath !== null || implicitSlot ) {
879
872
// If we're in some kind of context we can't necessarily reuse this object depending
880
873
// what parent components are used.
881
874
} else {
@@ -1320,10 +1313,7 @@ function renderModelDestructive(
1320
1313
const writtenObjects = request . writtenObjects ;
1321
1314
const existingId = writtenObjects . get ( value ) ;
1322
1315
if ( existingId !== undefined ) {
1323
- if (
1324
- enableServerComponentKeys &&
1325
- ( task . keyPath !== null || task . implicitSlot )
1326
- ) {
1316
+ if ( task . keyPath !== null || task . implicitSlot ) {
1327
1317
// If we're in some kind of context we can't reuse the result of this render or
1328
1318
// previous renders of this element. We only reuse elements if they're not wrapped
1329
1319
// by another Server Component.
@@ -1452,10 +1442,7 @@ function renderModelDestructive(
1452
1442
// $FlowFixMe[method-unbinding]
1453
1443
if ( typeof value . then === 'function' ) {
1454
1444
if ( existingId !== undefined ) {
1455
- if (
1456
- enableServerComponentKeys &&
1457
- ( task . keyPath !== null || task . implicitSlot )
1458
- ) {
1445
+ if ( task . keyPath !== null || task . implicitSlot ) {
1459
1446
// If we're in some kind of context we can't reuse the result of this render or
1460
1447
// previous renders of this element. We only reuse Promises if they're not wrapped
1461
1448
// by another Server Component.
0 commit comments