is missing in props validation typescript code example
Example 1: is missing in props validation typescript
function Person(props: PersonProps): React.ReactElement {
return (
<div>{props.username}</div>
)
}
Example 2: is missing in props validation typescript
import * as React from 'react';
interface PersonProps {
username: string;
}
function Person(props: PersonProps): React.ReactElement {
return (
<div>{props.username}</div>
)
}