Hi guys i am currently learning the React library and JSX but im stuck bc i dont understand what they want me to do here. You guys are my last solution: here is the code ... Use .renderSortByOptions() to sort the businesses by their options (If your wondering what im doing : i am currently trying to make something like Yelp using their API).. i know this site is not for debugging and i usually never ask for stuff like this here but i wanna keep learning and beeing stuck for so long is very demotivating
import React from 'react';
import './SearchBar.css';
const sortByOptions{
'Best Match': 'best_match',
'Highest Rated': ' rating',
'Most Reviewed': 'review_count'
}
class SearchBar extends React.Component{
renderSortByOptions(){
return Object.keys(sortByOptions).map(sortByOption =>{
let sortByOptionValue = sortByOptions[sortByOption];
return <li key=sortByOptionValue ></li>;
}
});
render(){
return(
<div className="SearchBar">
<div className="SearchBar-sort-options">
<ul>
<!-- Use .renderSortByOptions() to sort the businesses by their options -->
</ul>
</div>
<div className="SearchBar-fields">
<input placeholder="Search Businesses" />
<input placeholder="Where?" />
</div>
<div className="SearchBar-submit">
<a>Lets Go</a>
</div>
</div>
);
}
}
}
lito display? the values?=sign afterconst sortByOptions?