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.
Component.for 'cause it's fully missing everywhereAddressing the TODOs since it was straight forward to improve the pattern:
Updated viperHTML too.
@WebReflection thanks a lot for including this. I was banging my head for hours on how to pass a redux store from one component to another. Than I found this issue. Than I noticed that I was still using hyperhtml:2.6.0 where the context wasn't passed to the newly created Component when using .for(). I just updated to the latest version and now it works flawlessly.
You are doing incredible work here. I feel that you anticipated my problem before I even had it 馃槀
Most helpful comment
@WebReflection thanks a lot for including this. I was banging my head for hours on how to pass a redux store from one component to another. Than I found this issue. Than I noticed that I was still using
hyperhtml:2.6.0where the context wasn't passed to the newly created Component when using.for(). I just updated to the latest version and now it works flawlessly.You are doing incredible work here. I feel that you anticipated my problem before I even had it 馃槀