Skip to content

canvas re-render on state change #57

@mihaid85

Description

@mihaid85

Hi,

Changing the seconds prop with setState causes the component to re-render over existing drawing.
As soon as the timer ticks, the render looks as it should, so it's not a big problem unless the timer is paused. Then it ends up looking like in the attached screenshots.

Thanks.

Before changing seconds props:
screen shot 2018-05-08 at 15 33 45

After changing state:
screen shot 2018-05-08 at 15 33 57

This is the component:

and this is the parent state:
this.state={
sessionMinutes: 8,
pause: true
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions