importReactfrom"react";importaxiosfrom"axios";exportdefaultfunctionenhancer(Component){constdata=" || this is from the higher order component";returnfunction(props){return<Component{...props}data={data}/>;};}exportfunctionenhancerClass(Component){returnclassextendsReact.Component{state={data: []};componentDidMount(){axios.get("https://api.pokemontcg.io/v1/cards").then(res=>{this.setState({data: res.data.cards});});}render(){const{ data }=this.state;constcleanData=data.map(elem=>{returnelem.name;});return<Component{...this.props}data={cleanData}/>;}};}