-
Notifications
You must be signed in to change notification settings - Fork 66
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
Context isn't always up to date #49
Comments
Also, another workaround options that specifically for header, footer, and sub etc. information you can just add the correct |
@johnslemmer yeah that's a good idea. I'm still not too confident about how to make this work under all circumstances. See e.g. this code https://github.com/reactionic/reactionic/blob/master/src/components/ionBody.js#L163 that is needed for modals to work correctly if the underlying page has e.g. a footer, but the modal itself doesn't. |
In React context does not always get filtered down to children if it isn't tied to a change in state or properties. This can potentially lead to bugs within reactionic because context is used heavily to pass around information about the state of headers, footers, etc.
Read this and this
One example of this can be found with this code. When the initial login screen comes up, and you do a hard refresh the
has-header
context information will be inaccurate and the content will slide behind the header.I believe this issue will also show itself more when there are components that return
false
from React'scomponentShouldUpdate
betweenIonBody
and the component that wants to access context. I believeMeteorDataContainer
(the component created whencreateContainer
is called from Meteor's react-meteor-data) is one of those components that will cause this issue to be seen more often.I'm not sure of a solution, but wanted to track the bug. I've made some attempts to try and address this, but it didn't quite work.
The text was updated successfully, but these errors were encountered: