TextInput Change Handler
Learn the correct callback prop for reacting to typed text.
Codejavascript
import React, { useState } from 'react';
import { TextInput } from 'react-native';
export default function Field() {
const [text, setText] = useState('');
return (
<TextInput onChange={setText} value={text} />
);
}What is the bug in this code?