All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.src.directives.x-text.js Maven / Gradle / Ivy

There is a newer version: 3.14.1
Show newest version
import { directive } from '../directives'
import { mutateDom } from '../mutation'

directive('text', (el, { expression }, { effect, evaluateLater }) => {
    let evaluate = evaluateLater(expression)

    effect(() => {
        evaluate(value => {
            mutateDom(() => {
                el.textContent = value
            })
        })
    })
})




© 2015 - 2024 Weber Informatics LLC | Privacy Policy