Skip to content

Instantly share code, notes, and snippets.

@prashaantt
Last active December 2, 2016 10:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prashaantt/414f80774bfae52bc0b783d9181f4887 to your computer and use it in GitHub Desktop.
Save prashaantt/414f80774bfae52bc0b783d9181f4887 to your computer and use it in GitHub Desktop.
import * as React from "react";
interface MyComponentProps {
name: string;
countryCode?: string;
}
class MyComponent extends React.Component<MyComponentProps, {}> {
render() {
const { name, countryCode } = this.props;
return (
<div>
User: { name } <br/>
Country: { countryCode.toUpperCase() } // nope
</div>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment