Skip to content

Instantly share code, notes, and snippets.

@oney
Created June 3, 2022 08:14
Show Gist options
  • Save oney/95f5106f6104d0a3b2ca21ed4e2cec75 to your computer and use it in GitHub Desktop.
Save oney/95f5106f6104d0a3b2ca21ed4e2cec75 to your computer and use it in GitHub Desktop.
import { Form } from 'antd';
function Chat({onOdd, onEven}) {
const [text, setText] = useState('');
const onSubmit = useEvent(() => {
sendMessage(text);
});
return <Form submit={onSubmit} />;
// 🧐 Is 'submit' prop useEvent-safe?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment