I have something like this.
render(){
if(//loading){
return ( <div>loading</div>);
}
else{
if(//has results){
return (
this.props.reducer.results.map((result, i) => {
return <Result key={'credit-card-result-' + i} >{result}</Result>;
})
);
}
else {
return (
<div>no results found </div>
);
}
}
}
but this does not seem to work. I also wanted to do an elseif but that also did not work.