From f4325dac8e80b0c3075b2a85f556fd4455eaab3d Mon Sep 17 00:00:00 2001 From: Sam Zhou Date: Fri, 31 May 2024 10:06:09 -0700 Subject: [PATCH] Replace direct React.createElement call with jsx in react-native (#44738) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44738 Changelog: [Internal] Reviewed By: yungsters Differential Revision: D58004147 fbshipit-source-id: f42c939d92a876b8746703c134b246567846c3ee --- .../Lists/VirtualizedListCellRenderer.js | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/packages/virtualized-lists/Lists/VirtualizedListCellRenderer.js b/packages/virtualized-lists/Lists/VirtualizedListCellRenderer.js index d67f19884bd..32b9fa69546 100644 --- a/packages/virtualized-lists/Lists/VirtualizedListCellRenderer.js +++ b/packages/virtualized-lists/Lists/VirtualizedListCellRenderer.js @@ -140,17 +140,13 @@ export default class CellRenderer extends React.Component< } if (ListItemComponent) { - /* $FlowFixMe[not-a-component] (>=0.108.0 site=react_native_fb) This - * comment suppresses an error found when Flow v0.108 was deployed. To - * see the error, delete this comment and run Flow. */ - /* $FlowFixMe[incompatible-type-arg] (>=0.108.0 site=react_native_fb) - * This comment suppresses an error found when Flow v0.108 was deployed. - * To see the error, delete this comment and run Flow. */ - return React.createElement(ListItemComponent, { - item, - index, - separators: this._separators, - }); + return ( + + ); } if (renderItem) {