May 2018
Intermediate to advanced
470 pages
13h 54m
English
The first use case for applying the categories API and search API is the Search component:

The Search component provides the user with a simple form containing a search input text field and a dropdown of the category options received from a parent component that will retrieve the list using the distinct categories API.
mern-marketplace/client/product/Search.js:
<TextField id="select-category" select label="Select category" value={this.state.category} onChange={this.handleChange('category')} SelectProps={{ MenuProps: { className: classes.menu, } }}> <MenuItem value="All"> All </MenuItem> {this.props.categories.map(option => ...Read now
Unlock full access