dy / spect

Observable selectors in DOM
https://dy.github.io/spect
MIT License
74 stars 8 forks source link

v23: animevents-only $ #245

Closed dy closed 3 years ago

dy commented 3 years ago

The tool must be a simple lightweight

$('.some-behaviour', el => {
  // on mount
  return () => {
    // on unmount  
  }
})
$('[some-behavior]')
$('some-element')

That's for super-simple aspectful snippets collection, without much thinking. Selector-collection, v, h seem to be external. Whatever animevents allow implementing, no extra.

dy commented 3 years ago

Although tempting, animevents are async (was discussed before). That means, inserting an element will create a flick.