-
Notifications
You must be signed in to change notification settings - Fork 114
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
FluxComponent not working properly #133
Comments
There is an error in your 'App Component' code if you uncomment line - |
@istarkov when i put that code there I also
in the module like im suposed to. also im using eslint + react plugin, so like you've said I would get a big warning. |
You also need to remove |
yup, that was the issue. I think there must be a better way to deal with passing the props to components, maybe a higher order component would do better and cleaner job. Oops, just noticed https://github.com/acdlite/flummox/blob/master/src/addons/connectToStores.js The HoC is sooooo much nicer!, its behavior is much more intuitive, and the pattern is pretty similar to Relay's + GraphQL. I think this is a mayor plus of Flummox and should be explained better and presented as the default/recommended pattern in the readme/Docs. submitted a proposal for including better Docs showcasing the HoC here #136 |
For some reason FluxComponent isn't working properly for me;
1.- if I put the fluxcomponent on the top component it's children get the correct props, but their children don't get any props; no props.flux or props from stores.
2.- if I don't wrap the top component and put the fluxcomponent on a lower component, their children don't get any props, even if I call connectToStores. Also I get this error:
Uncaught Error: fluxMixin: Could not find Flux instance. Ensure that your component has either
this.context.fluxor
this.props.flux.
Here is the basic code structure:
Top Component.
App Component.
My package deps
The text was updated successfully, but these errors were encountered: