DEV Community

loading...

Discussion on: React Hooks: UseEffect, UseCallback, UseMemo

jacobmparis profile image
Jacob Paris Author

PURE

return (
    <Button
        productId={product.id}
        onClick={e => (
            dispatch(removeItem(e.target.getAttribute("productId")))
        )}
    >Delete</Button>
);