Answers for "react native delay input"

0

react native delay input

yarn add react-native-debounce-input
Posted by: Guest on September-09-2021
0

react native delay input

import React, { useState, createRef } from "react";
import { SafeAreaView, Text } from "react-native";
import DelayInput from "react-native-debounce-input";

const YourComponent = () => {
  const [value, setValue] = useState("Have");
  const inputRef = createRef();

  return (
    <SafeAreaView>
      <DelayInput
        value={value}
        minLength={3}
        inputRef={inputRef}
        onChangeText={setValue}
        delayTimeout={500}
        style={{ margin: 10, height: 40, borderColor: "gray", borderWidth: 1 }}
      />
      <Text>value: {value}</Text>
    </SafeAreaView>
  );
};

export default YourComponent;
Posted by: Guest on September-09-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language