Skip to content

react contact list#94

Open
PaulJohnson19 wants to merge 1 commit intoprojectshft:mainfrom
PaulJohnson19:main
Open

react contact list#94
PaulJohnson19 wants to merge 1 commit intoprojectshft:mainfrom
PaulJohnson19:main

Conversation

@PaulJohnson19
Copy link
Copy Markdown

No description provided.

type="text"
placeholder="Name"
value={newContact.name}
onChange={(e) => setNewContact({ ...newContact, name: e.target.value })}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't feel the need to abbreviate to single letters - its better to spell the whole thing out so that others have more context to what your parameters are.

},
{
id: Math.round(Math.random() * 100000000),
name: "Alby Einy",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice default contacts!


const deleteContact = (contactId) => {
const updatedContacts = contacts.filter((c) => c.id !== contactId);
setContacts(updatedContacts)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't forget semi-colons at the end of the line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants