title: ReactJs: Cannot update state on an unmounted component
body: <p>I am trying to get the stored time zone from the redux state using useSelector and send it to the Full Calendar as props. But I get this error,</p>
  <pre><code>react-dom.development.js:11340 Uncaught TypeError: moment__WEBPACK_IMPORTED_MODULE_1___default.a.tz is not a function
  </code></pre>
  <p>here's my function</p>
  <pre><code>export default function Schedule(){
      const { userTimezone } = useSelector((state) =&gt; state.settings)
      return (
      &lt;div className=&quot;container-fluid&quot;&gt;
        &lt;FullCalendar
          nowIndicator
          timeZone={userTimezone}
          plugins={[timeGridPlugin, dayGridPlugin, interactionPlugin, momentTimezonePlugin]}
          initialView=&quot;timeGridWeek&quot;
          headerToolbar={{
            left: 'prev,next today',
            center: 'title',
            right: 'dayGridMonth,timeGridWeek,timeGridDay',
          }}
          editable
          selectable
          selectMirror
          dayMaxEvents
          weekends
          locales={allLocales}
          events={currentevents}
        /&gt;
      &lt;/div&gt;
    )
  }
  </code></pre>
  <p>when I console log the userTimezone I am getting the desired string, when I enter the string manually on the timeZone prop, it works.. It is only when I pass the variable I get errors what could be the reason for this?</p>
  <p>DETAILED ERROR:</p>
  <pre><code>MomentNamedTimeZone.timestampToArray
  C:/Users/user/Desktop/frontend/src/main.ts:11
     8 | // explicit API
     9 | export { EventSourceApi } from './api/EventSourceApi'
    10 | export { EventApi, buildEventApis } from './api/EventApi'
  &gt; 11 | export { CalendarApi } from './CalendarApi'
    12 | export { formatDate, formatRange, FormatDateOptions, FormatRangeOptions } from './formatting-api'
    13 | export { ViewApi } from './ViewApi'
    14 | export * from './api-type-deps'
  
  DateEnv.timestampToMarker
  C:/Users/user/Desktop/frontend/src/datelib/env.ts:422
    419 |   } if (this.timeZone === 'UTC' || !this.namedTimeZoneImpl) {
    420 |     return new Date(ms)
    421 |   }
  &gt; 422 |   return arrayToUtcDate(this.namedTimeZoneImpl.timestampToArray(ms))
        | ^  423 | }
    424 | 
    425 | offsetForMarker(m: DateMarker) {
  
  DateEnv.createNowMarker
  C:/Users/user/Desktop/frontend/src/datelib/env.ts:98
     95 | 
     96 | createNowMarker(): DateMarker {
     97 |   if (this.canComputeOffset) {
  &gt;  98 |     return this.timestampToMarker(new Date().valueOf())
        | ^   99 |   }
    100 |   // if we can't compute the current date val for a timezone,
    101 |   // better to give the current local date vals than UTC
  </code></pre>