ionHasHeader, etc. Context are never set...
came opened this issue · comments
Hi,
I was just debugging a little bit, because my header and tabs are missing the has(Header|Tabs)* classes. When I look into the IonContent.js this depends on the context.
('has-header': this.context.ionHasHeader)
However, this context is never (nowhere) set as far as I can see. E.g. in IonNavBar component mount there is the:
this.context.ionUpdateHasX('ionHasHeader', true);
Behind this there is a function in IonBody that just sets the state in IonBody:
this.setState({ [hasX]: value });
In the end the state of IonBody seems correct, however the context is never provided in any child component.
Could this be a bug?
Best,
Carsten
ok, I think I got it. You set the state of the IonBody that reactively updates the entire context.
Unfortunately my context still does not update in the underlying components at least when I use the meteor 'meteor/react-meteor-data'.
The context seems to get lost somehow during:
export default ContactsGroupsPageContainer = createContainer(({}) => {
return {
}
}, ContactsGroupsPage);
any ideas?
ok ...this seems to be the issue: #49
and that a viable solution: https://github.com/reactionic/boilerplate-reactionic-meteor/blob/reactionic-issue-context-workaround/imports/ui/containers/MainContainer.jsx
really, really nice
thx @johnslemmer