let regSug = []
const {targetProperty} = this.props
const regex = new RegExp(`\\b${value}`, "i");
regSug = APIData.sort().filter((v) => v.targetProperty); //Cant reach targetProperty
App.js:
function App() {
return <Module targetProperty={"name"} />;
}
So I want to access a const inside filter in a anonymous function.