vue-stars-rating icon indicating copy to clipboard operation
vue-stars-rating copied to clipboard

Bind config Object directoly to v-bind - better performance & default values

Open JonathanDn opened this issue 6 years ago • 1 comments

When binding it directly to v-bind, performance would be better, And I would be able to declarre default values in the props rather than have to set them during mount/created.

To sum up this refactor will grant:

  1. Better Performance - a more flatten mapping of the binded props compared to a Watch Deep mapping that is more resource consumable for vue virtual DOM
  2. Easyness of Usage - Access to default values, types and more on each binded prop without need to declare and use setters
  3. Readability & Cleanness of code - Less code in the template & more readible.

Example: Instead of this: <selector v-bind:configData=configData">

Write this And declare each prop object in the props of the selector component

JonathanDn avatar Dec 30 '18 09:12 JonathanDn

  • Need to add support for Nested Object binding within the parent object to be binded.

JonathanDn avatar Jan 12 '19 03:01 JonathanDn