Skip to content

v6.2.0 - Minor Update

Choose a tag to compare

@Javiani Javiani released this 20 May 21:55
· 67 commits to main since this release

Change Log

Adding a new functionality that provides a interface to listening to component attribute changes.

Usage

export default function myComponent({ main }) {

  const attr = attributes()
 
  main(() => {
    attr.onchange('src', onChangeSrc)
  })

  const onChangeSrc = ( key, value ) => {
    console.log(`Changed ${key} to ${value}`)
  }
}