Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render bug #1

Closed
GavinJoyce opened this issue Feb 28, 2019 · 2 comments
Closed

Render bug #1

GavinJoyce opened this issue Feb 28, 2019 · 2 comments

Comments

@GavinJoyce
Copy link
Owner

GavinJoyce commented Feb 28, 2019

With the following component:

import Component from '@ember/component';
import { tracked } from '@glimmer/tracking';

export default class CounterComponent extends Component {
  @tracked count = 1;

  increment() {
    this.count++;
    setTimeout(() => {
      this.count++;
    }, 1000);
  }
}

The {{count}} property isn't updating correctly. It seems that the property mutation within the setTimeout isn't causing a render.

counter

Here's the same component working on try.glimmer.com

@rwjblue
Copy link

rwjblue commented Feb 28, 2019

Should be fixed by emberjs/ember.js#17682 once the latest ember-source canary build is published and you update to it...

@GavinJoyce
Copy link
Owner Author

Confirmed fixed with the latest build, thanks!:

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants