marko-js-archive / marko-widgets

[LEGACY] Module to support binding of behavior to rendered UI components rendered on the server or client
http://v3.markojs.com/docs/marko-widgets/
MIT License
141 stars 40 forks source link

Docs improvement: State returned from getInitialState(input) should be based on the input #104

Open maberer opened 8 years ago

maberer commented 8 years ago

We should document, that "State returned from getInitialState(input) should be based on the input". Otherwise, hard coded objects do not only cause a re-render (in case of an empty array), they even get reseted to their initial state (when they are changed in the meantime).

As a consequence, there is nothing like "truly private properties", that keep their state when the component gets re-rendered because of a changed input property...

The issue is discussed here: https://github.com/marko-js/marko-widgets/issues/100