How to use the spect.state function in spect

To help you get started, we’ve selected a few spect 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 spectjs / spect / example / email-validator.js View on Github external
function main(el) {
  let {value} = state()

  html`<${el}>
    Please enter an email address:
    <input name="email"> state({value: e.target.value})}/&gt;

    The address is ${isValidEmail(value)}
  `
}

spect

Observe selectors in DOM

MIT
Latest version published 2 years ago

Package Health Score

45 / 100
Full package analysis

Popular spect functions