Failed prop type: Invalid prop `value` of type `number`

Kindth

I have an issue with TextInput in react native so when I submit to update, I am getting an error of ' Invalid prop value of type number supplied to ForwardRef(TextInput)'. May someone help me to solve this issue.

Error:

Warning: Failed prop type: Invalid prop value of type number supplied to ForwardRef(TextInput), expected string. at node_modules\react-native\Libraries\LogBox\LogBox.js:173:8 in registerError

Here is my code :

const [Phase, setPhase] = useState('')
      const [Days, setDay] = useState(null)
      const [TempMin, setTempMin] = useState(null)

  <TextInput
                    style={styles.input}
                    onChangeText={(text) => setPhase(text)}
                    placeholder={plants.Phase}
                    value={Phase}
                    name="Phase"
                    selectTextOnFocus={false}
                    editable={false}


                />
                <Text style={styles.titleInput}>Nombre de jour</Text>
                <TextInput
                    style={styles.input}
                    onChangeText={(text) => setDay(text)}
                    keyboardType='numeric'
                    placeholder={`${plants.Days}`}
                    value={Days}
                    name="Days"
                />
                <Text style={styles.titleInput}>T° Min</Text>
                <TextInput
                    style={styles.input}
                    onChangeText={(text) => setTempMin(text)}
                    keyboardType='numeric'
                    placeholder={`${plants.TempMin}`}
                    value={TempMin}
                    name="TempMin"
                />
Kindth

value={String(Days)}

or

if(String(Days)){....}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Failed prop type: Invalid prop 'value'

Warning: Failed prop type: Invalid prop `value` of type `number` supplied to `TextInput`, expected `string`

[Vue warn]: Invalid prop: type check failed for prop "page". Expected Number with value 0, got String with value ""

Vuejs error, Invalid prop: type check failed for prop. Expected Date, got Number with value

Failed prop type: Invalid prop `to` supplied to `Redirect`

Invalid prop `style` of type `number`

Failed prop type: Invalid prop `children` of type `array` supplied to `GlobalState`

Failed prop type: Invalid prop `opacity` of type `object` supplied to `RCTView`

React Warning: Failed prop type: Invalid prop of type `Object` supplied

Failed prop type: Invalid prop `className` of type 'function'

Failed prop type: Invalid prop 'value' of type 'object' supplied to 'TextInput' React Native

Invalid prop: type check failed for prop "value". Expected Boolean, got String with value "0"

Failed prop type: Invalid prop `preferences[19].category` of value `MemberBenefitInterests` supplied to `SettingsPage`

Invalid prop: type check failed for prop "cellClass". Expected String with value "[object Object]", got Object

[Vue warn]: Invalid prop: type check failed for prop "productCartData". Expected Object, got String with value "[object Object]"

Failed prop type: Invalid prop `lg` supplied to `ForwardRef(Grid)`

Warning: Failed prop type: Invalid prop `tag` supplied to `NavLink`

Warning: Failed prop type: Invalid prop 'source' supplied to 'Image'

warning: failed prop type: invalid prop 'backgroundcolor' supplied to view:

laravel vue pagination return invalid prop type check failed for prop

Image not displaying when using Graphql and Contentful in Gatsby, Failed prop type: Invalid prop `image` of type `number` expected `object`?

Invalid prop type supplied

Vue: Invalid prop: type

Failed prop type The prop is marked as required but its value is `undefined`

ReactJS Failed Prop Type With 'undefined' Value

React Native error Failed prop type: Invalid prop `children` of type `array` supplied to `Overlay`,

Failed prop type: Invalid prop `match.params` of type `object` supplied to `Page`, expected `string`

Warning: Failed prop type: Invalid prop `data` of type `object` supplied to `Carousel`, expected `array`

Failed prop type: Invalid prop `onClick` of type `object` supplied to `ButtonBase`, expected `function`