I have a Searchbar component within react-native that is imported within a parent component,
The SearchBar child component has the following element:
<Search
ref={component => this._search = component}
onChangeText={this.searchUpdated}
blurOnSubmit
useClearButton={false}
backgroundColor='#15A5E3'
/>
searchUpdated(term) {
return new Promise((resolve, reject) => {
this.setState({ searchTerm: term });
resolve();
});
}
Is is possible to access the state of this child component within the parent in which it is imported? Thanks in advance fo the help