import React from 'react' import { useDispatch, useSelector } from 'react-redux' import { addVote } from '../reducers/anecdoteReducer' const List = () => { const dispatch = useDispatch(); const anecdotes = useSelector((state) => state); const handleVote = (id) => { dispatch(addVote(id)); } return (

List of anecdotes

{anecdotes.map((anecdote) => (

"{anecdote.content}" has {anecdote.votes} votes

))}
); }; export default List;