I have added a condition in rendering and suddenly it stops displaying. Here is the code am using.
{this.state.sdata.map((sdata, i) => {i < 5 &am
{this.state.sdata.map((sdata, i) => (i < 4 && this.handleSelect(i)}{...sdata} /> ) ) }
Just replace the {} with () like shown above and to show 4 data you have to provide less than 4 because i starts with 0.
{}
()