Skip to content

canvas re-render on state change #57

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
};

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions