title: TypeError: n is not a function in SPFx component
body: <p>In a SPFx (1.12.1 or 1.13.0) React webpart ,I have an Array of objects in the state, that I show in a parent component with:</p>
  <pre><code>{upfiles.map((file, i) =&gt; {
                 return (&lt;FileActionComponent i={i} setcurrentMessage={setcurrentMessage} /&gt;);
     })}
  </code></pre>
  <p>Inside the &quot;FileActionComponent&quot; component, I have  buttons to change the array.
  When the change is to an item, it works fine but when the change is to remove the item from the array, I get the following error the number of times as the length of the array:</p>
  <pre><code>TypeError: n is not a function
      at https://modernb.akamai.odsp.cdn.office.net/files/sp-client/sp-webpart-workbench-assembly_en-us_eec15c86d62ce90f8fe18e58491cf728.js:70:90216
      at t.unstable_runWithPriority (https://modernb.akamai.odsp.cdn.office.net/files/sp-client/sp-webpart-workbench-assembly_en-us_eec15c86d62ce90f8fe18e58491cf728.js:70:5230)
      at Bi (https://modernb.akamai.odsp.cdn.office.net/files/sp-client/sp-webpart-workbench-assembly_en-us_eec15c86d62ce90f8fe18e58491cf728.js:70:50948)
      at is (https://modernb.akamai.odsp.cdn.office.net/files/sp-client/sp-webpart-workbench-assembly_en-us_eec15c86d62ce90f8fe18e58491cf728.js:70:90138)
      at cs (https://modernb.akamai.odsp.cdn.office.net/files/sp-client/sp-webpart-workbench-assembly_en-us_eec15c86d62ce90f8fe18e58491cf728.js:70:92705)
      at uc (https://modernb.akamai.odsp.cdn.office.net/files/sp-client/sp-webpart-workbench-assembly_en-us_eec15c86d62ce90f8fe18e58491cf728.js:70:105747)
      at t.unstable_runWithPriority (https://modernb.akamai.odsp.cdn.office.net/files/sp-client/sp-webpart-workbench-assembly_en-us_eec15c86d62ce90f8fe18e58491cf728.js:70:5230)
      at Bi (https://modernb.akamai.odsp.cdn.office.net/files/sp-client/sp-webpart-workbench-assembly_en-us_eec15c86d62ce90f8fe18e58491cf728.js:70:50948)
  </code></pre>
  <p>If I remove an item from outside of the &quot;FileActionComponent&quot; component, it works fine but it is not the desired UX.
  Any suggestions?</p>