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?
Asked
Active
Viewed 324 times
1 Answers
3
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
WHITECOLOR
- 24,996
- 37
- 121
- 181