title: Uncaught TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))
body: <p>Error is</p>
  <p>Uncaught TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))</p>
  <pre><code>import React from 'react';
  import { NavigationBar } from './components/header/Navbar';
  import {Outlet} from &quot;react-router-dom&quot;
  
  
  export default function App(){
    const [account, setAccount] = React.useState&lt;string&gt;('')
    return (
      &lt;div className=&quot;App&quot;&gt;
        &lt;NavigationBar /&gt;
          &lt;Outlet context={[account, setAccount]}/&gt;
      &lt;/div&gt;
    );
  }
  </code></pre>
  <p>I am getting error on the line <code>const {account, setAccount} = useOutletContext();</code>
  Below is the snippet of code where account and setAccount is needed.</p>
  <pre><code>import { useOutletContext } from &quot;react-router-dom&quot;;
  const NavigationBar:React.FC = () =&gt; {
      const [account, setAccount] = useOutletContext();
      // rest of the code
  }
  </code></pre>