« first day (420 days earlier)      last day (300 days later) » 

03:50
Hi, did i need to add onclick event in all the li i had? is there any better to do this?
<li onClick={onClick()}></li>
<li onClick={onClick()}></li>
<li onClick={onClick()}></li>
if jquery, it will be as easy as just $('li').on('click', function(){});
 
1 hour later…
04:51
manage to do this
this.state.pages.map((label) => {
return (
<li key={label.page} onClick={this.onClick}><Link to={"/" + label.page}><i className={label.icon} aria-hidden="true"></i> {label.page}</Link></li>
);
})
but the onclick did not return meaningful value that can determine which li is being clicked
05:44
@Se0ng11 its becoz you have to pass some id or value as a reference on which li you onClick .
this.onClick(label.page) you can pass as a reference or this.onClick(indexValueOfPages)
06:11
thanks for the help, its working
 
3 hours later…
08:53
hi @Tirth
09:42
hi @Sport

« first day (420 days earlier)      last day (300 days later) »