elm-mdc
elm-mdc copied to clipboard
Use animation frame instead of globaltick event
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.
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.