How to update the array - ReactNative
问题 What I'm trying to achieve is an Array like this infos = [{type: 'phone', val: '2222222'} {type: 'email', val: 'abc@abc.com'}] Here is the state constructor(props) { super(props); this.state = { rows: [], //this is used for the add component contactDetails: [{type: '', val: ''}], // where i will add the values }; } So I have a two TextInput <View> <TextInput label='Type'/> <TextInput label='Details'/> </View> This View can be dynamically added when a button is clicked and can also be deleted.