Cannot read properties of null (reading 'map')

Viewed 29
2 Answers

There is a possibility that the Videos component is not getting a video as props. So to overcome the situation you can use

videos?.map()

So basically just add a question mark

return (
        <>
           { videos && <Stack direction='row' ... >}
        </>
       )

Related