From 841d3d1b75491ce153a53d1887ab020458090bbd Mon Sep 17 00:00:00 2001 From: Eugene Dzhumak Date: Sun, 18 Sep 2022 02:44:37 +0400 Subject: [PATCH] [Beta]: fix typo on you-might-not-need-an-effect (#5077) fix typo on you-might-not-need-an-effect --- beta/src/content/learn/you-might-not-need-an-effect.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beta/src/content/learn/you-might-not-need-an-effect.md b/beta/src/content/learn/you-might-not-need-an-effect.md index 1cb4638e..914896d5 100644 --- a/beta/src/content/learn/you-might-not-need-an-effect.md +++ b/beta/src/content/learn/you-might-not-need-an-effect.md @@ -1262,7 +1262,7 @@ This approach satisfies the requirements too. When you type into the input, only #### Reset state without Effects {/*reset-state-without-effects*/} -This `EditContact` component receives a contact object with shaped like `{ id, name, email }` as the `savedContact` prop. Try editing the name and email input fields. When you press Save, the contact's button above the form updates to the edited name. When you press Reset, any pending changes in the form are discarded. Play around with this UI to get a feel for it. +This `EditContact` component receives a contact object shaped like `{ id, name, email }` as the `savedContact` prop. Try editing the name and email input fields. When you press Save, the contact's button above the form updates to the edited name. When you press Reset, any pending changes in the form are discarded. Play around with this UI to get a feel for it. When you select a contact with the buttons at the top, the form resets to reflect that contact's details. This is done with an Effect inside `EditContact.js`. Remove this Effect. Find another way to reset the form when `savedContact.id` changes.