I have my component:
getInitialState() { return { items: [] }; }, componentDidMount() { // make remote call to fetch `items` this.setState({ items: itemsFromServer }) }, render(){ if(!this.state.items.length){ // show empty state } // output items }
Extremely invented / isolated, but this is a general idea. When you first download this component, you see the HTML "empty state" flash, as the server has not returned any data yet.
Does anyone have a / React Way β’ approach to handle whether there is any actual data or show download status?
source share