Skip to content

Commit

Permalink
Fix typo in FieldArray example (#447)
Browse files Browse the repository at this point in the history
Surely no one would just copy a code sample and paste it into their production application.......

BUT just in case, this should fix a syntax error that they might encounter. 🙈
  • Loading branch information
newswim authored and jaredpalmer committed Feb 21, 2018
1 parent 837d702 commit d36aa71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -1331,13 +1331,13 @@ export const FriendList = () => (
<Field name={`friends.${index}`} />
<button
type="button"
onClick={() => arrayHelpers.remove(index) // remove a friend from the list}
onClick={() => arrayHelpers.remove(index)} // remove a friend from the list
>
-
</button>
<button
type="button"
onClick={() => arrayHelpers.insert(index, '') // insert an empty string at a position}
onClick={() => arrayHelpers.insert(index, '')} // insert an empty string at a position
>
+
</button>
Expand All @@ -1348,7 +1348,7 @@ export const FriendList = () => (
type="button"
onClick={() => arrayHelpers.push('')}
>
{/** show this when user has removed all friends from the list */}
{/* show this when user has removed all friends from the list */}
Add a friend
</button>
)}
Expand Down

0 comments on commit d36aa71

Please sign in to comment.