title: Reach Router with TypeScript
body: <p>I have some code that looks like this</p>
  
  <pre class="lang-js prettyprint-override"><code>import React from 'react';
  import { Router, Redirect } from '@reach/router';
  import Posts from './screens/Posts';
  
  function App() {
    return (
      &lt;Router&gt;
        &lt;Posts path="posts" /&gt;
        &lt;Redirect from="/" to="posts" noThrow default /&gt;
      &lt;/Router&gt;
    );
  }
  </code></pre>
  
  <p>the <code>default</code> prop says its invalid on the Redirect is there a way in React to type the children of a component?</p>
  
  <p>it looks like there might be a way to do it using something like this: <a href="https://www.typescriptlang.org/docs/handbook/jsx.html#children-type-checking" rel="nofollow noreferrer">https://www.typescriptlang.org/docs/handbook/jsx.html#children-type-checking</a></p>
  
  <p>but I'm still pretty new to TypeScript so I'm unsure how exactly that would work in practice.</p>