How to use on-change - 2 common examples

To help you get started, we’ve selected a few on-change examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github elementreejs / elementree / lib / elementree.js View on Github external
function create (state, callback) {
  const State = (() => state)()
  return onChange(State, callback)
}
github elementreejs / elementree / lib / location.js View on Github external
export default (callback) => {
  if (observer) return observer
  observer = onchange(location, (_, value) => {
    onProgramaticChange(value)
    callback(observer)
  })
  callback(location)
  return observer
}

on-change

Watch an object or array for changes

MIT
Latest version published 11 months ago

Package Health Score

70 / 100
Full package analysis

Popular on-change functions