Skip to content

Commit 7de552a

Browse files
committed
Do not add the displayName for the forwardRef components
1 parent b8becd0 commit 7de552a

7 files changed

Lines changed: 6 additions & 26 deletions

File tree

src/components/AnimatedFlatListWithCellRenderer.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@ const AnimatedFlatListWithCellRenderer = forwardRef(FlatListForwardRefRender) as
116116
},
117117
) => React.ReactElement;
118118

119-
AnimatedFlatListWithCellRenderer.displayName = 'AnimatedFlatListWithCellRenderer';
120-
121119
type ReanimatedFlatList<T> = typeof AnimatedFlatList & AnimatedFlatListComplement<T>;
122120

123121
export type {ReanimatedFlatList, AnimatedFlatListWithCellRendererProps};

src/components/FlatList/FlatListWithScrollKey/BaseFlatListWithScrollKey.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,4 @@ function BaseFlatListWithScrollKey<T>(props: BaseFlatListWithScrollKeyProps<T>,
9191
);
9292
}
9393

94-
const ForwardedBaseFlatListWithScrollKey = forwardRef(BaseFlatListWithScrollKey);
95-
ForwardedBaseFlatListWithScrollKey.displayName = 'BaseFlatListWithScrollKey';
96-
97-
export default ForwardedBaseFlatListWithScrollKey;
94+
export default forwardRef(BaseFlatListWithScrollKey);

src/components/FlatList/FlatListWithScrollKey/index.ios.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,4 @@ function FlatListWithScrollKey<T>(props: FlatListWithScrollKeyProps<T>, ref: For
6262
);
6363
}
6464

65-
const ForwardedFlatListWithScrollKey = forwardRef(FlatListWithScrollKey);
66-
ForwardedFlatListWithScrollKey.displayName = 'FlatListWithScrollKey';
67-
68-
export default ForwardedFlatListWithScrollKey;
65+
export default forwardRef(FlatListWithScrollKey);

src/components/FlatList/FlatListWithScrollKey/index.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,4 @@ function FlatListWithScrollKey<T>(props: FlatListWithScrollKeyProps<T>, ref: For
1818
);
1919
}
2020

21-
const ForwardedFlatListWithScrollKey = forwardRef(FlatListWithScrollKey);
22-
ForwardedFlatListWithScrollKey.displayName = 'FlatListWithScrollKey';
23-
24-
export default ForwardedFlatListWithScrollKey;
21+
export default forwardRef(FlatListWithScrollKey);

src/components/KeyboardDismissibleFlatList/index.ios.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,4 @@ function KeyboardDismissibleFlatList<T>({onScroll: onScrollProp, ...restProps}:
5454
);
5555
}
5656

57-
const ForwardedKeyboardDismissibleFlatList = forwardRef(KeyboardDismissibleFlatList);
58-
ForwardedKeyboardDismissibleFlatList.displayName = 'KeyboardDismissibleFlatList';
59-
60-
export default ForwardedKeyboardDismissibleFlatList;
57+
export default forwardRef(KeyboardDismissibleFlatList);

src/components/KeyboardDismissibleFlatList/index.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,4 @@ function KeyboardDismissibleFlatList<T>({onScroll: onScrollProp, inverted, ...re
2929
}
3030

3131
// eslint-disable-next-line no-restricted-syntax
32-
const ForwardedKeyboardDismissibleFlatList = React.forwardRef(KeyboardDismissibleFlatList);
33-
ForwardedKeyboardDismissibleFlatList.displayName = 'KeyboardDismissibleFlatList';
34-
35-
export default ForwardedKeyboardDismissibleFlatList;
32+
export default React.forwardRef(KeyboardDismissibleFlatList);

src/pages/signin/ValidateCodeCountdown/index.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,4 @@ function ValidateCodeCountdown({onCountdownFinish}: ValidateCodeCountdownProps,
3737
);
3838
}
3939

40-
const ForwardedValidateCodeCountdown = forwardRef(ValidateCodeCountdown);
41-
ForwardedValidateCodeCountdown.displayName = 'ValidateCodeCountdown';
42-
43-
export default ForwardedValidateCodeCountdown;
40+
export default forwardRef(ValidateCodeCountdown);

0 commit comments

Comments
 (0)