Last active
September 24, 2020 00:39
-
-
Save timbuckley/2d6e2bb66696a0345fcc9e3d6185ea49 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
function Spenses({ items }) { | |
function deleteItem({ id, amount }) { | |
// Delete the item. | |
} | |
return ( | |
<> | |
{items.map((item, index) => ( | |
<tr key={index}> | |
<a | |
href="#!" | |
onClick={() => deleteItem(item)} | |
> | |
Delete Item | |
</a> | |
</tr> | |
))} | |
</> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment