如果有很多条目,为什么在 render slow/freeze 应用程序中使用地图?

Why using map in render slow/freeze app if there is a lot of entries?

我有一个带 1 个按钮的屏幕 (n°1)。当我点击它时,我必须等待 1 到 4 秒才能看到下一个屏幕 (n°2),这真的很慢而且很无聊。

我发现问题来自这一行: {this.state.db.map((项目, 索引) => this.renderItem(项目, 索引))}

db 包含 327 个条目。当 db 包含 2 个条目时,它呈现得很快。

为什么?我能做什么?

考虑使用 FlatList,因为它是专门为此用例设计的。