DEV Community

Discussion on: Fetching data from an api using React/Redux

Collapse
 
apekearo profile image
Anthony Pekearo • Edited

Hello Markus, I'm getting fetchProducts() is not a function in your componentWillMount function. And I don't see where it is defined. ComponentWillMount is being depricated, but don't think that is why i'm getting this error. Thank you
componentWillMount() {
const {fetchProducts} = this.props;
fetchProducts();
}

Collapse
 
mukhtorov profile image
Sardor

yeah, it is giving error