@erickmerchant/framework
Advanced tools
Comparing version 43.7.0 to 43.8.0
export const createApp = (state) => { | ||
let callingView = false | ||
let willCallView = false | ||
@@ -14,8 +13,4 @@ let view | ||
if (!callingView && view) { | ||
callingView = true | ||
view(get()) | ||
callingView = false | ||
if (view) { | ||
view(state) | ||
} | ||
@@ -25,22 +20,2 @@ }) | ||
const proxy = new Proxy( | ||
{}, | ||
{ | ||
set(_, key, val) { | ||
if (callingView) return false | ||
state[key] = val | ||
callView() | ||
return true | ||
}, | ||
get(_, key) { | ||
return state[key] | ||
} | ||
} | ||
) | ||
const get = () => (typeof state === 'object' ? proxy : state) | ||
return { | ||
@@ -53,5 +28,3 @@ render(v) { | ||
set state(val) { | ||
if (val !== proxy) { | ||
state = val | ||
} | ||
state = val | ||
@@ -61,5 +34,5 @@ callView() | ||
get state() { | ||
return get() | ||
return state | ||
} | ||
} | ||
} |
{ | ||
"name": "@erickmerchant/framework", | ||
"version": "43.7.0", | ||
"version": "43.8.0", | ||
"description": "A front-end framework.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/erickmerchant/framework#readme", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17420
571