React 'state' issue, looking for explanation
The best I can do because of work permissions is share a pastebin copy (att'd) of the react component I'm working with. Luckily my problem doesn't go beyond the scope of this component anyhow.
I'm returning two major pieces of html inside of the component's return div:
1. a
2. a
The problem, and
This
It's also receiving the update function:
As the user interacts with the FullCalendar, clicking an 'event', I have a handler for the click declared in the Dates component,
This updates the formState, and I confirmed it by console logging formState and seeing the change (see picture attachment of console)
Parallel to the above handler, for the checkbox <input/> elements that I'm mapping, I have separate handler , 'handleCheckboxChange':
I'm returning two major pieces of html inside of the component's return div:
1. a
<FullCalendar/> component, which has an event listener on it for clicking/interacting with 'events' in the calendar.. and2. a
<dialog/> component, which displays information about the event clicked on. The <dialog/> is triggered to open by the event handler on the FullCalendar, running dialog.showModal() inside of its hander, and which is an inbuilt method that comes with 'dialog'.The problem, and
**formState**:This
<Dates/> component is being invoked inside another component's <form/>, and receives and updates a formState object from that "parent" form in the other component. It's also receiving the update function:
updateFormField()As the user interacts with the FullCalendar, clicking an 'event', I have a handler for the click declared in the Dates component,
handleDateChange:This updates the formState, and I confirmed it by console logging formState and seeing the change (see picture attachment of console)
Parallel to the above handler, for the checkbox <input/> elements that I'm mapping, I have separate handler , 'handleCheckboxChange':

dates.js9.93KB
