[IMP] observer: add set and delete static functions

This rev. add a 'set' and 'delete' static functions to the Observer.
They allow to set or delete (only for objects) properties on
observed objects or arrays.

With this, the 'set' functions in Store and Component are no longer
necessary, so they have been removed.

Closes #138
This commit is contained in:
Aaron Bohy
2019-06-06 09:08:51 +02:00
committed by Géry Debongnie
parent 49baf0de6e
commit d1094f647a
7 changed files with 106 additions and 58 deletions
-5
View File
@@ -146,11 +146,6 @@ find a template with the component name (or one of its ancestor).
if we have a `isMobile` key in the environment, to decide if we want a mobile
interface or a destkop one.
- **`set(target, key, value)`**. This method is necessary in some cases when we
need to modify the state of the component in a way that is not visible to the
observer (see [observer's technical limitations](observer.md#technical-limitations)).
For example, if we need to add a key to the state.
- **`destroy()`**. As its name suggests, this method will remove the component,
and perform all necessary cleanup, such as unmounting the component, its children,
removing the parent/children relationship. This method should almost never be