Skip to content

Instantly share code, notes, and snippets.

@koss-lebedev
Created May 24, 2018 13:52
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 koss-lebedev/9f9163c5b42ac34a592c87a6441abd9a to your computer and use it in GitHub Desktop.
Save koss-lebedev/9f9163c5b42ac34a592c87a6441abd9a to your computer and use it in GitHub Desktop.
// @flow
export type IProps = {|
+title: string,
+description?: string,
|}
class Post extends React.Component<IProps, {}> {
componentDidMount() {
// this will give as Flow error
this.props.description = "New description"
}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment