Closed
Description
While answering this StackOverflow post I've realized that Component.for(item)
makes the usage of item
itself impossible if not through a redundant Component.for(item).update(item)
as pattern suggested when Component.for
was introduced.
It would be probably very handy/awesome to be able to get back the context/object used to create the component, so that internally one could retrieve data via this.owner.id
, as example.
TODO
- avoid any memory leak through cross referenced components/contexts
- think about an accessor name that makes sense (i.e. owner is misleading)
- write documentation about
Component.for
'cause it's fully missing everywhere