skip to Main Content

Javascript – Why am I getting a 'cannot read properties of null' error with dot notation in React, and how can I fix it?

using traditional ways of accessing objects with dot notation {quote.text} {quote.author} i'm receiving a "cannot read properties of null" error import { useState, useEffect } from 'react'; import "./React.css"; function getRandomQuote(quotes) { return quotes[Math.floor(Math.random() * quotes.length)]; } export default function…

VIEW QUESTION
Back To Top
Search