title: Invalid hook call error, but everything seems to be good
body: <p>Hello guys that's the first time I'm asking a question right here, but i'm really running out of ideas on this ... </p>
  
  <blockquote>
    <p>Uncaught Error: Invalid hook call. Hooks can only be called inside of
    the body of a function component. This could happen for one of the
    following reasons:
    1. You might have mismatching versions of React and the renderer (such as React DOM)
    2. You might be breaking the Rules of Hooks
    3. You might have more than one copy of React in the same app</p>
  </blockquote>
  
  <p>For a React-native project running on React-native web, I want to run an init function in my component with the <code>useEffect()</code> hook. In order to get data from a local library that i've imported with <code>yarn link</code> (<strong>that library doesn't use react</strong>). </p>
  
  <p>As you can se bellow my hook is in a functional component :</p>
  
  <pre class="lang-js prettyprint-override"><code>import React, { useEffect } from 'react';
  
  import Premium from './Premium';
  
  const Widget = () =&gt; {
  
    useEffect(() =&gt; {
      init();
    }, []);
  
    const init = async () =&gt; {
      console.log('working');
    };
  
    return (
      &lt;Premium /&gt;
    );
  };
  
  export default Widget;
  </code></pre>
  
  <p>I've also check my versions of react and react-dom as it says <a href="https://reactjs.org/warnings/invalid-hook-call-warning.html" rel="nofollow noreferrer">here</a> and I only got one copy of react / react-dom and react-native.</p>
  
  <p>To be sure, i've checked this in two different ways as it says in the official documentation.
  ( Via <code>npm ls react-native</code> and also via <code>console.log(window.React1 === window.React2);</code> )</p>
  
  <p>Here's my <strong>package.json</strong> :</p>
  
  <pre><code>  "scripts": {
      "lint": "./node_modules/.bin/eslint .",
      "test": "./node_modules/.bin/jest"
    },
    "dependencies": {
      "@react-native-community/async-storage": "^1.10.3"
    },
    "devDependencies": {
      "@babel/core": "7.9.6",
      "@poool/eslint-config": "0.0.1-alpha.3",
      "babel-eslint": "10.1.0",
      "babel-jest": "26.0.1",
      "enzyme": "3.11.0",
      "enzyme-adapter-react-16": "1.15.2",
      "eslint": "6.8.0",
      "eslint-config-standard": "14.1.1",
      "eslint-plugin-babel": "5.3.0",
      "eslint-plugin-import": "2.20.2",
      "eslint-plugin-node": "11.1.0",
      "eslint-plugin-promise": "4.2.1",
      "eslint-plugin-react": "7.20.0",
      "eslint-plugin-standard": "4.0.1",
      "jest": "26.0.1",
      "jest-canvas-mock": "1.1.0",
      "metro-react-native-babel-preset": "0.59.0",
      "react": "16.11.0",
      "react-dom": "16.11.0",
      "react-native": "0.62.2",
      "react-native-web": "0.12.2",
      "react-test-renderer": "16.9.0"
    }
  }
  </code></pre>
  
  <p>Thanks for all ! And feel free to tell me if I did something wrong, that's the first time for me :)</p>