-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Description
- first
if(item%50 === 0) {
if(topToDown[index+1] === buffer[i].start) {
return (
<ListGroupItem style={fillerBlockHeight} key={item}></ListGroupItem>
);
}
return (
<ListGroupItem style={defaultBlockHeight} key={item}></ListGroupItem>
);
}
as you can see - we have a similar return, just a different an attribute.
i think we can improve it and return this Tag only once, but in different conditions
- second
{this.rendererFunc(data[this.props.index])}
does we're really need to pass that data in render()?
- third
for(var traverse = 0; traverse <= 900; traverse +=25) {
topToDown.push(traverse);
if(buffer[i].start === traverse ) {
traverse += buffer[i].height - 25;
if(i < buffer.length - 1){
i++;
}
}
}
Use underscore for simplifying code here
Metadata
Metadata
Assignees
Labels
No labels