Created
August 26, 2018 22:13
-
-
Save glaucia86/4b891ac92ddfad50b316cc2fdbc14155 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Arquivo: defaultProps-jsx.ts | |
* Author: Glaucia Lemos | |
* Data: 23/08/2018 | |
*/ | |
// Antes: | |
export interface Props { name?: string } | |
export class Saudar extends React.Component<Props> { | |
render() { | |
const { nome } = this.props; | |
return <div>Fala ${nome!.toUpperCase()}!</div> | |
} | |
static defaultProps = { nome: 'Glaucia Lemos' } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment