I have to files, App.js and Example.js
App.js
import React from 'react'
import Example from './Example'
const App = () => {
return (
<div>
<Example render={ students => <ul> Hi , {students.forEach( student => {return <div>{student}</div>}) } </ul> } />
</div>
)
}
export default App
and Example.js
import React from 'react'
function Example(props) {
return (
<div>
{props.render(["Maria", "Alice", "Gina", "Cleopatra"])}
</div>
)
}
export default Example
The expected result was ,,Hi Maria , Alice ..." i wanted to see the names, but for some reason, without no error, i only get ,,Hi"
Does anyone see the issue?
Many thanks