title: React.useContext and Minified React error #321;
body: <p>I have a context:</p>
  <pre><code>export const AppConstArrays = createContext({
      neededHours: [],
      setNeededHours: (neededHours: INeededHours[]) =&gt; { },
      serviceTypes: [],
      setServiceserviceTypes: (serviceTypes:IServiceTypes[]) =&gt; { },
  });
  </code></pre>
  <p>I am able to use the set functions in a data service this works with no error.</p>
  <pre><code>ArraysState.setNeededHours(neededHours);
  ArraysState.setServiceserviceTypes(services);
  </code></pre>
  <p>When I try to use it elsewhere,</p>
  <pre><code>export default function reCalc(index:number) {  //This is not a function component?
      const ArraysState = React.useContext(AppConstArrays);
  
  }
  </code></pre>
  <p>The tslinter is OK but at run time, I get the nasty 321 :-)</p>
  <pre><code>sp-webpart-workbench-assembly_en-us_8439e1230cb8ca442df6f89cf19f89a6.js:1 Uncaught Invariant Violation: Minified React error #321; visit https://reactjs.org/docs/error-decoder.html?invariant=321
  Hooks can only be called inside of the body of a function component
  </code></pre>
  <p>truth be told, I do not have a provider anywhere for it because I use it in a .ts file
  Any help?
  Thank yeAll</p>