domino.js icon indicating copy to clipboard operation
domino.js copied to clipboard

[reboot-proposal] Use #go to skip the setTimeout in #addOrder

Open jacomyal opened this issue 9 years ago • 0 comments

Here is the problem to solve: If in a React component with a domino mixin, you write something like :

this.control.update('myProperty', myValue);
this.control.emit('myEvent');
// Or maybe more something like:
this.control
  .update('myProperty', myValue)
  .emit('myEvent');

...domino will use a setTimeout(fn, 0) to execute orders in a lazy way. But it will often cause some UX problems to have rendering frames appearing between the user input and the next actual rendering. So, I want to add a domino#go method that will skip that rendering.

So, the previous code would look like that:

this.control
  .update('myProperty', myValue)
  .emit('myEvent')
  .go();

jacomyal avatar Nov 19 '14 17:11 jacomyal