We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c248ff commit 3ca5202Copy full SHA for 3ca5202
src/components/MessageForm/index.js
@@ -7,12 +7,12 @@ import { MAX_MESSAGE_TEXT_LENGTH } from "../../config";
7
import "./styles.css";
8
9
export const MessageForm = ({ user }) => {
10
- let text = "";
+ const [text, setText] = React.useState("");
11
12
const handleChange = event => {
13
event.preventDefault();
14
const updatedText = event.target.value;
15
- text = updatedText; // TODO: update text on change
+ setText(updatedText);
16
};
17
18
return (
0 commit comments