Javascript – New to React; react-calendar props showing as undefined in separate function but work with anonymous function
import logo from './logo.svg'; import React, { useState } from 'react'; import ReactDOM from 'react-dom/client'; import './index.css'; import reportWebVitals from './reportWebVitals'; import Calendar from 'react-calendar'; import 'react-calendar/dist/Calendar.css'; import './App.css'; function App() { const [date, setDate] = useState(new Date()); return (…