在另一个屏幕上反应本地更新平面列表

时间:2019-06-25 07:42:24

标签: reactjs react-native react-redux react-native-flatlist

是否有任何方法可以更新平面列表或从其他屏幕重新渲染它 我有屏幕A和B 在A中,我从API提取数据 在B中,我添加了更多数据

我的问题是我添加的数据直到退出应用并重新打开后才会出现

在屏幕A中,我有平面列表

   componentWillMount(){

          AsyncStorage.getItem('customer_id').then((customer_id) => {

        AsyncStorage.getItem('sale_id').then((sale_id) => {

            this.props.get_notes(sale_id,customer_id)   

    });

       });

   }


      <FlatList
                   style={{flex:1}}
                   data={this.props.data}
                   renderItem={this._renderListID}
                   keyExtractor={item => item.note_id}
             /> 

0 个答案:

没有答案