When running my script I get the error that my function is not defined. I think I am creating or calling my function inside of the Class incorrectly.
This one is supposed to be an IIFE (Immediately Invoked Function Expression) but I'm not sure if thats possible inside of a class. (The second part where StartCalender() is called is in another function in my script)
startCalender = ((month) => {
//contents
})();
startCalender(//variable);
The other function causing the same error I tried as an arrow function but changed it to see if it would fix the error:
changeMonth(changeAmount) {
//contents
startCalender(//variable);
};
This is called in the return() of Render():
<BiLeftArrowAlt className="arrowIcon leftArrow" onClick={() => changeMonth(-1)}/>
This is just an Imported FontAwesome component which calls the previous function when clicked.