Premium Only Content

Insert Message from React Controlled Input Component Value
The lecture goes over taking what the user typed and adding that to the list of messages.
The input element is turned into a React controlled component with the setting of value and onChange props.
The value of the input comes from a state variable. The useState hook can be used to tell React to track a certain value.
The onChange is a function definition with instructions to mutate the state for the new message that is typed into the text box.
Given an event object, you can access the input text using the value property of the target property.
Be careful about replacing existing React state whenever you call a set function from useState hook. In many cases, you might want to take the existing value and append to it, instead of replacing everything.
-
2:14:00
Inverted World Live
8 hours agoLegion of Zoom | Ep. 109
207K10 -
2:42:57
TimcastIRL
9 hours agoDOJ Releases Charlie Kirk Assassin Messages, Trans Left Aligned Confirmed | Timcast IRL
350K207 -
1:09:13
Man in America
12 hours agoSICK: Xi & Putin Caught Plotting Organ Transplants for “Eternal Life”
86.3K29 -
6:04:35
Drew Hernandez
14 hours agoMASS CONFUSION AROUND CHARLIE'S MURDER
68K51 -
1:01:40
HotZone
6 days ago $14.06 earned"Prepare for WAR" - Confronting the URGENT Threat to America
91.1K22 -
20:23
Scammer Payback
14 hours agoTerrifying Scammers with File Deletions
49.7K13 -
16:22
The Gun Collective
11 hours agoWOW! 17 New Guns JUST GOT RELEASED!
65.4K11 -
1:13:57
Glenn Greenwald
12 hours agoYoung Men and Online Radicalization: Dissecting Internet Subcultures with Lee Fang, Katherine Dee, and Evan Barker | SYSTEM UPDATE #516
198K82 -
1:14:57
Sarah Westall
9 hours agoCEO of Crowds on Demand: The Fake World of Social Media, Protests & Movements w/ Adam Swart
77.8K15 -
4:03:25
Geeks + Gamers
12 hours agoTuesday Night's Main Event
87.2K2