UNPKG

reactive-props

Version:

An all-in-one implementation of the Reactive State for Data & DOM patterns.

12 lines (9 loc) 278 B
import {defineProperties, loop, noop} from './utils.js'; const value = (props, key) => props[key]; export default ({ all = false, shallow = true, useState = noop } = {}) => (props, update) => defineProperties( {}, loop(props, value, all, shallow, useState, update) );