this is how ive set up my search js file to search through the api data but i want to call my inputted data as well so i can search for both. the way its set up right now is that there is an api woth an array of objects each data has the name, email etc and this calls this so under each one i have my a search bar to input my data and can input as many tags as i want for each. Now i just want to call the hook state data into this js file to search but im not sure how to do it, any help would be appreciated.
class Search extends Component {
constructor(props, tag) {
super(props);
this.state = {
searchString: "",
searchTagString: "",
data: [],
//tags: tag
};
this.handleChange = this.handleChange.bind(this);
}
componentDidMount(tag) {
this.setState({
data: 'api placeholder',
// tags: tag
});
// this.refs.search.focus();
}
handleChange() {
this.setState({
searchString: this.refs.search.value,
// searchTagString: this.search.value
});