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
Warning: Failed propType: Invalid props.style key 'color' supplied to [ 'View' | 'RCTView' ] #52
Comments
Hi can you do a fresh install and see if it's still the case? |
Did the warnings go away for you? Or are you not able to duplicate the warnings yourself? They are still there for me. I like to document exactly what I did to test this so we're on the same page. Maybe I'm doing something wrong.
|
I just did a clean install of |
I'm confused. I originally opened this issue on the Maybe if you installed starter kit and tested you'd be able to duplicate the issue? |
|
was just trying to be helpful. thanks for your attention |
BTW @sankhadeeproy007 the reason I thought it had something to do with the button is because if you compare the full warning to the Button.js component, you'll notice that their structures are the same. That was the only place I found this similarity.
Also, removing line 14 as you suggested does make the error go away, but only because that same style is applied to the button. If you remove that style from the button, the warning goes away as well.
So the root of the problem does indeed seem to be in the Button component. It doesn't like it when you pass Anyways, I know it's not as helpful as it could be, but it's as much as I have at the moment. |
If we go through the docs of react-native. It is clearly mentioned that
I'm not sure though what you mean by that. We remove the style, the conflicting attribute is removed, so no warnings. |
Ah! light-bulb. That makes sense about TouchableOpacity being essentially a View.
To better explain myself, I removed the |
Checking out the source code, I found that you can simply add prop 'color' to the button, so it will have top priority and will be showed. This way you may also save your custom style.
|
We have |
This issue is so annoying, not because NativeBase has something to do with this issue, but since it is the same company whom I payed 100$ for a start kit which has not compatible with the open source written by company, causing this issue. |
@moshebeeri We are in the process of upgrading all the themes. You will receive an update soon. And we are trying our level best to push the community forward. Bugs do pop-up, no software is perfect. But we are trying really hard to get things moving with the latest version. |
use xxxStyle: Text.propTypes.style |
React will not allow you to add properties like (font, font-weight, colors,....) to that view if you want to assign such properties to add this property to , This might help you |
is this the same issue with Error: Invalid props.style key |
Original issue submitted here...
start-react/native-starter-kit#10
I'm using
native-starter-kit
, which usesnative-base
. In both iOS and Android simulators, I'm receiving these warnings after clicking "Login"iOS
Android
I believe the error is occurring in /native-base/Components/Widgets/Button.js, but I haven't been able to locate it yet.
The text was updated successfully, but these errors were encountered: