Below you can see simpliest component ever that renders a functional component using hooks.
import React, { Component, useState } from 'react'
export default class ImageList extends Component {
render() {
return (
<div>
{RenderImages()}
</div>
)
}
}
export const RenderImages = (props) =>
{
const [images,setImages] = useState([])
return(
<div>
Images will be rendered here!
</div>
)
}
Searched but couldn't find solution... Why it's not working? what is wrong with hooks here?