Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ionHasHeader, etc. Context are never set... #59

Open
came opened this issue Jun 11, 2016 · 2 comments
Open

ionHasHeader, etc. Context are never set... #59

came opened this issue Jun 11, 2016 · 2 comments

Comments

@came
Copy link

came commented Jun 11, 2016

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

@came
Copy link
Author

came commented Jun 11, 2016

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?

@came
Copy link
Author

came commented Jun 11, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant