title: Property 'props' does not exist on type '{}' (trying to get access to props of children) - React Typescript
body: <p>I'm doing custom Tabs component and ran into some problems.</p>
  <p>When I try to get access to the 'props' of children I get an error: <strong>Property 'props' does not exist on type '{}'</strong></p>
  <pre><code>const Tabs: FC&lt;{
    children: ReactNode[];
  }&gt; = ({ children }) =&gt; {
    const [activeTab, setActiveTab] = useState&lt;TabLabel | null&gt;(null);
    
    useEffect(() =&gt; {
      setActiveTab(children[0]?.props.label);
    }, []);
  }
  </code></pre>
  <p>I would not be surprised with this error if it appeared in another place where I am traversing the array of children using the map method.</p>
  <pre><code>{children.map(
            (child) =&gt;
              isValidElement(child) &amp;&amp; (
                &lt;button
                  className={cn('checkout-tabs_tab', { '-active': child.props.label === activeTab })}
                  key={child.props.label}
                  onClick={() =&gt; onSetActiveTab(child.props.label)}
                  role=&quot;tab&quot;
                  type=&quot;button&quot;
                &gt;
                  {child.props.label}
                &lt;/button&gt;
              )
   )}
  </code></pre>
  <p>The code above <strong>does not give an error</strong> when trying to access props. I know there is a check with <code>isValidElement</code> react helper but if I do the same check in the place where I get the error, it gives me another one:</p>
  <pre><code>useEffect(() =&gt; {
      if (isValidElement(children[0])) {
        setActiveTab(children[0]?.props.label);
      }
   }, []);
  </code></pre>
  <p>// <strong>TS2571: Object is of type 'unknown'.</strong></p>
  <p>I'm kinda new to typescript/react and would be glad to have this behavior explained to me. Thank you!</p>