I am new to using react-big-calendar and somewhat new to react. Trying to simply import and default calendar into a base app created with the react app cli. That said, my base index.js looks like:
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import BigCalendar from 'react-big-calendar';
import moment from 'moment';
BigCalendar.momentLocalizer(moment);
const MyCalendar = props => (
<div>
<BigCalendar
events={myEventsList}
startAccessor='startDate'
endAccessor='endDate'
/>
</div>
);
registerServiceWorker();
I have an event.js
as shown in the example, but am thinking I am not getting an event prop somehow. After searching, I cannot find what I may be doing wrong from just trying to use a default calendar within my app. I can clone the calendar and run that way, but that isn't in my app. Looking at the docs and comparing what was done for their examples versus what I am trying to do isn't working.
When I run my app using npm start
, I get:
I am hoping someone here can point me in the right directions.