react native delay input

Solutions on MaxInterview for react native delay input by the best coders in the world

showing results for - "react native delay input"
María
08 Sep 2020
1import React, { useState, createRef } from "react";
2import { SafeAreaView, Text } from "react-native";
3import DelayInput from "react-native-debounce-input";
4
5const YourComponent = () => {
6  const [value, setValue] = useState("Have");
7  const inputRef = createRef();
8
9  return (
10    <SafeAreaView>
11      <DelayInput
12        value={value}
13        minLength={3}
14        inputRef={inputRef}
15        onChangeText={setValue}
16        delayTimeout={500}
17        style={{ margin: 10, height: 40, borderColor: "gray", borderWidth: 1 }}
18      />
19      <Text>value: {value}</Text>
20    </SafeAreaView>
21  );
22};
23
24export default YourComponent;
25
Jorge
18 Jul 2017
1yarn add react-native-debounce-input