React Native:通过 setState 更新 ListView 数据源是否会重新渲染整个组件

React Native: Does updating a ListView dataSource through setState rerender the whole component?

本文关键字:新渲染 组件 是否 数据源 Native 通过 setState ListView 更新 React      更新时间:2023-09-26

如果我使用 this.setState({dataSource: blabla}) 更新 ListView 的数据源,这会触发整个组件的重新渲染吗?我只想更改 ListView 中的数据,并且不想再次计算昂贵的重新渲染。

看起来整个应用程序都会重新渲染。但是,如果重新渲染只有一个小的更改,则它不应该是昂贵的。因为它只会重新呈现更改。
https://facebook.github.io/react/docs/reconciliation.html