I'm trying to make a multiple choice quiz game. In this component I am rendering a paragraph with the body of the question and I also want to render an array of list elements which will be all the possible answers. The problem I'm having is that the list of answers is not rendering... Here is my code
function Question(props) {
const [answers, setAnswers] = React.useState(props.answers);
return (
<div>
<p>{props.question}</p>
{answers.map(el => {
<li>{el}</li>
})}
</div>
)
}
export default Question