Browse Source

typo fix

main
Dan Abramov 3 years ago
parent
commit
8fb5a45d60
  1. 2
      beta/src/pages/learn/you-might-not-need-an-effect.md

2
beta/src/pages/learn/you-might-not-need-an-effect.md

@ -1571,7 +1571,7 @@ label, textarea { margin-bottom: 10px; display: block; }
<Solution> <Solution>
The `isSent` state variable determines whether to show the form or the "Thank you" dialog. However, you aren't sending the message because the "Thank you" dialog was _displayed_. You want to send the message because the user has _submitted the form._ Delete the misleading Effect and move the `sendMessage` call inside the `handleSubmit` event handler: The `showForm` state variable determines whether to show the form or the "Thank you" dialog. However, you aren't sending the message because the "Thank you" dialog was _displayed_. You want to send the message because the user has _submitted the form._ Delete the misleading Effect and move the `sendMessage` call inside the `handleSubmit` event handler:
<Sandpack> <Sandpack>

Loading…
Cancel
Save