I am still new to react and ES6. I have been sitting with ES6 before learning react, but sometimes i just forget how to use ES5. I might be confused.
import React from 'react'
import './App.css'
import Joke from './component/Joke.js';
import JokesData from "./component/JokesData.js"
function App() {
//Mapping component. Getting data from another file.
const jokeComponents = JokesData.map(function(item) {
<Joke key={justdo.id} question={justdo.question} puncline={justdo.punchline}/>)
return (
<div>{jokeComponents} </div>
)
}
}
export default App;