Skip to content

Commit dcd88c6

Browse files
j-wenningmilesfrain
authored andcommitted
[Ch8] Prevent Loss of Focus in Example
Adds a key to the form element, preventing unnecessary rerenders that drop input focus whenever the error div is added to (or removed from) the DOM.
1 parent 7a58ff4 commit dcd88c6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

exercises/chapter8/src/Main.purs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ mkAddressBookApp =
127127
]
128128
<> renderPhoneNumbers
129129
]
130+
, key: "person-form"
130131
}
131132
]
132133
}

0 commit comments

Comments
 (0)