reactive-props
Version:
An all-in-one implementation of the Reactive State for Data & DOM patterns.
1 lines • 680 B
JavaScript
var stateHandler=function(t){"use strict";var n=Object.defineProperties,e=Object.keys,r=function(t,n,e,r,o){return{configurable:!0,get:function(){return r},set:function(u){(t||u!==r||n&&"object"==typeof u&&u)&&(r=u,e?o.call(this,r):o.call(this))}}},o=function(t,n,o,i,c,a){for(var l={},f=c!==u,s=[o,i,f],v=e(t),d=0;d<v.length;d++){var h=n(t,v[d]),b=f?c(h):[h,c];a&&(b[1]=a),l[v[d]]=r.apply(null,s.concat(b))}return l},u=function(){},i=function(t,n){return t[n]};return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.all,r=void 0!==e&&e,c=t.shallow,a=void 0===c||c,l=t.useState,f=void 0===l?u:l;return function(t,e){return n({},o(t,i,r,a,f,e))}}}();