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 Component Label declared 'PropTypes' instead 'propTypes'. #72
Comments
Please see #80 for the fix (it just makes the replacement of |
Just installed the package from npm, also got this error, and ended up right back here through google :) So, could it be that you haven't published the latest version that includes this fix to npm yet? |
Please make this fix public.... |
@Asinox, you could use my fork here https://github.com/priezz/react-native-clean-form/tree/switch ( |
@priezz If i use your fork with switch branch, i get this error: TypeError: Cannot read property 'Label' of undefined. |
Could you send the full error message with the stacktrace?
пт, 7 сент. 2018 г., 18:02 Naidu Annepu <notifications@github.com>:
… @priezz <https://github.com/priezz> If i use your fork with switch
branch, i get this error: TypeError: Cannot read property 'Label' of
undefined.
But if i use master branch, i do not have any issues.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#72 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGXu_RqGiDfiqeXp5gbM0IVUuI9vuM-Cks5uYpitgaJpZM4Rb1x5>
.
|
I still get the same error the 22th of august 2019 with the version 0.5.0 |
@ticketapp, use my |
Ok thanks. Then there is no way to get this version by Yarn? |
@ticketapp |
I didn't know this, thank you very much. |
@priezz My working form does not work with your repo :(, I get this error: "Undefined is not an object (evaluation 'theme.Label') " |
@ticketapp W/o going into details I guess, that in my fork, import {Theme} from 'react-native-clean-form'
import {
Input,
Select,
Switch,
} from 'react-native-clean-form/redux-form'
import {colors} from '@/styles'
const FormItem = ({label, name, theme, type, ...rest}: any) => {
let Component = Input
if(type === 'select') Component = Select
if(type === 'switch') Component = Switch
return <Component
{...rest}
allowFontScaling={false}
border={false}
label={typeof label !== 'undefined' ? label : name.capitalize()}
name={name}
returnKeyType='done'
theme={theme || (type === 'switch' ? switchTheme : formTheme)}
thumbColor={colors.lightBlue}
/>
}
export default FormItem
export const formTheme = {
...Theme,
BaseInput: {
...Theme.BaseInput,
placeholderColor: colors.textSecondary2,
fontSize: 15,
lineHeight: 16,
},
ErrorMessage: {
...Theme.ErrorMessage,
color: colors.otherPink,
fontSize: 12,
},
Fieldset: {
...Theme.Fieldset,
borderBottomWidth: 0,
},
FieldsetLabel: {
...Theme.FieldsetLabel,
fontSize: 15,
},
FormGroup: {
...Theme.FormGroup,
height: 32,
justifyContent: 'space-between',
marginBottom: 2,
},
Input: {
...Theme.Input,
color: colors.text,
paddingBottom: 0,
underlineColor: colors.textSecondary2,
},
LabelText: {
...Theme.LabelText,
color: colors.textSecondary1,
fontSize: 14,
},
Select: {
...Theme.Select,
fontSize: 15,
hideArrow: true,
},
Switch: {
...Theme.Switch,
activeBackgroundColor: colors.background3,
activeColor: colors.blue,
inactiveBackgroundColor: colors.background3,
inactiveColor: colors.background4,
justifyContent: 'space-between',
},
}
export const switchTheme = {
...formTheme,
Label: {
...formTheme.Label,
flex: 3,
},
} |
Indeed, fot the future readers: I just added theme={Theme} after having imported it and it works like a charm (but only with the Master and Switch branches, not with the nostyled one). Thanks a lot |
hello.. i got warning error
Warning Component Label declared 'PropTypes' instead 'propTypes'. Did u misspell the property assignment.
how can i fix it? i try to edit
Label.js
to
its working.. but not in Input.js
to
here is my code
thank u..
The text was updated successfully, but these errors were encountered: