Skip to content

Instantly share code, notes, and snippets.

@prashaantt
Last active December 2, 2016 12:37
Show Gist options
  • Select an option

  • Save prashaantt/05811c959155781cd115d7062a87992a to your computer and use it in GitHub Desktop.

Select an option

Save prashaantt/05811c959155781cd115d7062a87992a to your computer and use it in GitHub Desktop.
interface MyComponentProps {
name: string;
countryCode?: string;
userStore: UserStore; // made required
router: InjectedRouter; // made required
}
...
class OtherComponent extends React.Component<{}, {}> {
render() {
return (
<MyComponent
name="foo"
countryCode="in"
// Error: 'router' and 'userStore' are missing!
/>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment