import React from 'react';

const ItemsList = ({items, removeItem}) => (
        <ul>
        {
          items.map((item, index) => 
            <li>
                  <p>{item}</p>
                  <button onClick={() => removeItem(index)}>Supprimer</button>
            </li> 
          ) 
        }
        </ul>
)

export default ItemsList;