elm-mdc icon indicating copy to clipboard operation
elm-mdc copied to clipboard

Use animation frame instead of globaltick event

Open berenddeboer opened this issue 5 years ago • 1 comments

Investigate if it's easier, better and possible to rely in requestAnimationFrame instead of the globaltick event. The latter one relies in diffing the virtual dom, and I'm not sure how scalable that is.

The intend is to use the Elm's animation-frame package.

berenddeboer avatar Apr 15 '19 19:04 berenddeboer

Hi @berenddeboer, as far as I can tell it is not possible to drop globaltick completely, because:

  • you cannot run a JSON decoder from subscriptions, and
  • a component only exists in model once it differs from that component's default state.

There are some instances where we could use animation frame rather than globaltick, but I think we cannot get rid of globaltick altogether.

aforemny avatar Apr 15 '19 19:04 aforemny