Missing Required Props for TextInput Error
See original GitHub issueWhen I try to compile the code below, I get a missing props error for the TextInput component. Could you please clarify what prop field I am missing? Using the react native equivalent component does seem to work for some odd reason. Having some documentation with the required props for the TextInput component would have really helped.
import { View, TextInput, SxProp } from 'dripsy'
import { StyleSheet } from 'react-native'
import { Dispatch, SetStateAction } from 'react'
interface InputProp {
textState: [string, Dispatch<SetStateAction<string>>]
placeholder?: string
placeholderTextColor?: string
sx?: SxProp
}
export function Input({
textState,
placeholder,
placeholderTextColor,
sx,
}: InputProp) {
const [text, setText] = textState
const placeholderText = placeholder || 'Text'
const placeholderColor = placeholderTextColor || 'rgba(255, 255, 255, 0.96)'
const labelStyle = sx || styles.container
return (
<View sx={labelStyle}>
<TextInput
value={text}
onChangeText={setText}
placeholder={placeholderText}
placeholderTextColor={placeholderColor}
/>
</View>
)
}
const styles = StyleSheet.create({
container: {
backgroundColor: 'rgba(255, 255, 255, 0.06)',
borderRadius: 16,
},
})
Issue Analytics
- State:
- Created 9 months ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
[Vue warn]: Missing required prop: "productInfo" - Stack Overflow
I keep getting the error: [Vue warn]: Missing required prop: "productInfo" in my .vue file. It says its found in ProductSlider.vue.
Read more >"Missing required prop" error - Get Help - Vue Forum
Hi, I got the below error, please advise, <template> <div> <img @click="lightboxEffect(index)" v-for="(thumbnail, index) in thumbnails" ...
Read more >Inconsistent documentation on mandatory `textAlign` prop of ...
I'm using react-native-paper 4.7.1 with Typescript. If I update to 4.8.1, Typescript compiler raise an error that TextInput and SearchBar need ...
Read more >Useful Patterns by Use Case - React TypeScript Cheatsheets
Usecase: you want to make a <Button> that takes all the normal props of <button> and does ... In future, the need to...
Read more >'value' is missing in props validation - You.com | The AI Search ...
The error is gone, but I want/need to use prop deconstruction. The error is probably caused by the deconstruction of the ResultListItem prop...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

We’re also seeing this error on
TextInputPackage.json
Example Code
I’m also wondering if downgrading TypeScript to 4.4.3 could help.
Apologies for this, TypeScript is changing fast which makes things tricky for library authors.