On Mon, 18 Aug 2014 11:49:51 +0200
Martin Grigorov <[email protected]> wrote:

> Hi,
> 
> I still find it confusing :-/
> 
> 1) with this we will have: the constructor, onInitialize() and
> onAddToPage() being called as component initializers. Way too much
> IMO. onInitialize() and onAddToPage() are exactly the same thing at
> this stage.

At this stage, yes. 

> 2) onRemove() is not named onRemoveFromPage(). (I don't like the name
> onAddToPage())

I'm not invested in the name, so that can be changed :-)

> Is it possible to redo it as onReAdd(), i.e. it will be called when
> the component is added to a parent and it is already initialized. Not
> sure but maybe all that is needed to do it is to remove the call to
> onAddToPage() in onInitialize(), and rename the method.

Hm. That means that if I want to always react to being added, I'd have
to do it in both onInitialize and onReAdd.

However, I can see that it would potentially remove some confusion by
more clearly defining the difference between the two.

I'll give it a try and update the branch.

Carl-Eric

Reply via email to