import React from 'react'; import Box from '../partials/box'; import Api from '../api'; class Category extends React.Component { state = { category: {}, items: [], currentLoaded: config.loadingItems, moreLoaded: false, moreToLoad: true }; componentWillReceiveProps(nextProps) { this.setState({ category: {}, items: [] }); this.loadCategoryItems(nextProps); } constructor(props) { super(props); this.loadCategoryItems(props); } // todo: fix icon load. render() { return (