Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

60
Vistas
Cant write more than one letter in TextInput

Im unable to write more than one letter in the text input.

I have tried to run after clearing the cache expo r -c

Does anyone has any idea why is this happening and how to fix it.

Running with

"expo": "^44.0.5", "react": "17.0.1", "react-dom": "17.0.1", "react-native": "0.64.3",

const Posts = () => {

    const isDarkMode = useColorScheme() === 'dark'

    const [search, setSearch] = useState('')
    const [refresh, setRefresh] = useState(false);

    const handleOnEndReach = () => {

    }

    const handleRefresh = () => {
        setRefresh(true)
        setTimeout(() => {
            setRefresh(false)
        }, 3000)
    }

    return (
        <TouchableWithoutFeedback
            onPress={() => Keyboard.dismiss()}
            style={{flex: 1, backgroundColor: isDarkMode ? colors.dark.background : colors.light.background}}
        >
            <FlatList
                ListHeaderComponent={() => 
                    <TextInput
                        value={search}
                        onChangeText={setSearch}
                        style={{padding: '2.5%'}}
                        keyboardAppearance={isDarkMode ? 'dark' : 'light'}
                        placeholder='Search...'
                        
                    />
                }
                style={{padding: '2.5%'}}
                onEndReached={handleOnEndReach}
                onEndReachedThreshold={0.5}
                refreshControl={
                    <RefreshControl refreshing={refresh} onRefresh={handleRefresh} tintColor={isDarkMode ? 'white' : 'black'}/>
                }
            />
        </TouchableWithoutFeedback>
    )
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

use defaultValue instead of value, I would write something like this:

function App() {
  const [input, setInput] = React.useState("")
  
  function handleChange(e) {
    e.preventDefault();
    setInput(e.target.value)
  }

  return (
    <input className="text-input" defaultValue={input} onChange={handleChange(e)}/>
  )
}

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda