Skip to content

dayModel.js -> rendererFunc () #39

@atherdon

Description

@atherdon
  • 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
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions