Reputation: 4663
In other words, is there any way to access a DOM element after it is rendered? Things like mouse focus, code highlighters, animations, how are they done in Cycle.js?
Upvotes: 3
Views: 324
Reputation: 26142
If you use standard @cycle/dom
(for cycle@6) driver which uses virtual-dom there are hooks, which you can use as on create
(hook
) and on destory
(unhook
) events:
https://github.com/Matt-Esch/virtual-dom/blob/master/docs/hooks.md
If you are using cycle-snabbdom
it has even richer hooks mechanics: https://github.com/paldepind/snabbdom#hooks
Upvotes: 3