-
Notifications
You must be signed in to change notification settings - Fork 240
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
Passing Props Warning React 15.3.0 #69
Comments
Yeah you are totally correct on this, it is actually fixed by #63 and in master. I was initially waiting on a few more things for a release version but Im just going to get it out today. I'll close this when I do. |
Released 0.7.0 just now. Should be fixed. Feel free to re-open if it isn't resolved but there is a test for it so Im fairly confident. |
Hi, I'm experiencing the same problem (currently on version 0.8.0) when I wrap an NavDropdown control from react-bootstrap (which renders an anchor element):
Would it be possible to add a parameter that could disable passing props / authData, or the possibility to pass in a prop filtering function? If disabled/filtered, an alternate version of the DecoratedComponent can be instantiated here: |
@larsw I do want to add a parameter to disable passing the authData down, see #28. We shouldn't be passing down the failureRedirectPath though since thats probably useless to the decorated component...that seems like a bug. I would think the only thing that should be passed from the wrapper-specific props is authData and then control that with a flag. #28 isn't hard to implement, I've just been pretty busy lately. I can try to get to it soon, but probably not for another week. In the meantime, you should be able to use a function component to wrap the control and drop the props. Something like: const myWrapper = UserAuthWraper({
...
})
// Instead of myWrapper(NavDropdown)
myWrapper(() => <NavDropdown />) |
We have upgraded to React 15.3.0 from 15.1.0 and are now receiving this warning while using your wrapper.
It references this documentation which deals with passing props. My guess is the way that you are passing the props to the loading component (in this case the default is making React upset.
Here are what my auth wrappers look like in case that is helpful or the issue is actually on my side
The text was updated successfully, but these errors were encountered: