I am trying to make Search Bar. I want user to type something in TextInput and when user press 'Enter' I want to call my function.
<TextInput
//here when user press enter call function()
style={styles.searchStyle}
allowFontScaling={false}
placeholder="Search"
onChangeText={(val) => {setSearch(val)}}
/>
I tried onSubmitEditing but it doesn't work.