Can't call setState (or forceUpdate) on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
Pressing on a "Place" item in the listview from react-native-google-places-autocomplete triggers the error. I've stepped through it in Chrome's devtools and found the error occurs right after TouchableHighlight from _renderRow (please see screenshot below).

<GooglePlacesAutocomplete
autoFocus
debounce={200}
enablePoweredByContainer={false}
fetchDetails={false}
GooglePlacesSearchQuery={{
rankby: 'distance',
types: 'establishment'
}}
listViewDisplayed={destinationInput}
minLength={2}
nearByPlacesAPI="GooglePlacesSearch"
onPress={data => setDestination(data)}
placeholder="Where to?"
placeholderTextColor="black"
ref={setRef}
returnKeyType="search"
styles={searchDestStyle}
textInputProps={{
onBlur: blurDest,
onFocus: focusDest
}}
query={{
key: config.apiKey,
language: 'en',
types: ['establishment', 'geocode'],
location: '37.786279,-122.406456',
radius: '15000',
components: 'country:us'
}}
/>
destinationInput is a Boolean from redux state.
setDestination, blurDest, focusDest are a redux action creators.
setDestination sends the location data to redux state, which react-native-maps-directions uses to send direction coordinates to react-native-maps. Then a react-native modal is triggered.
"expo": "^29.0.0",
"react": "16.4.2",
"react-native": "https://github.com/expo/react-native/archive/sdk-29.0.0.tar.gz",
"react-native-google-places-autocomplete": "^1.3.9"
Same here! But I just get a warning.
set debounce to 0 if it is fine with your usecase.
I have the same problem and setting debounce to 0 didn't help. The warning is still there half of the times.
This sounds like it might be caused by redux updating the props when the component is unmounted, hence the error. See this article for more.
Most helpful comment
set debounce to 0 if it is fine with your usecase.