How to specify (optional) default props with TypeScript for stateless, functional React components?
<p>I'm trying to create a stateless React component with optional props and defaultProps in Typescript (for a React Native project). This is trivial with vanilla JS, but I'm stumped as to how to achieve it in TypeScript.</p>

<p>With the following code:</p>

<pre><code>import React, { Component } from 'react';
import { Text } from 'react-native';

interface TestProps {
    title?: string,
    name?: string
}

const defaultProps: TestProps = {
    title: 'Mr',
    name: 'McGee'
}

const Test = (props = defaultProps) =&gt; (
    &lt;Text&gt;
        {props.title} {props.name}
    &lt;/Text&gt;
);

export default Test;
</code></pre>

<p>Calling <code>&lt;Test title="Sir" name="Lancelot" /&gt;</code> renders "Sir Lancelot" as expected, but <code>&lt;Test /&gt;</code> results in nothing, when it should output 
"Mr McGee".</p>

<p>Any help is greatly appreciated.</p>