atomicojs / atomico

Atomico a micro-library for creating webcomponents using only functions, hooks and virtual-dom.
https://atomicojs.dev
MIT License
1.18k stars 43 forks source link

Update for the benefit of animation libraries and web-components in core/src/diff-props.js #11

Closed UpperCod closed 5 years ago

UpperCod commented 5 years ago

Updates

style management

State, setStyle generated a string style based on an object in order to clean the previous state of style, this is unfriendly to the definition of style in a superior way, for example from the HTML or animation libraries.

PR, setStyle maintains a local state associated with the one that intervenes, giving as a benefit parallel states associated with style.

attributes as object

State, setProperty defines an object type attribute as [Object Object], this is unfriendly with WCs.

PR, setProperty when defining an attribute type object as an attribute use JSON.stringify.