I have a react component like
const Example = () => (... );
Using react-navigation I would normally apply naviga
The key idea is to specify correct type for Example constant. Probably, react-navigation already provides that type. But, you can also extend build-in React interface smth like this:
interface NavStatelessComponent extends React.StatelessComponent {
navigationOptions?: Object
}
const Example: NavStatelessComponent = () => {
return (
...
)
}
Example.navigationOptions = {
/*
...
*/
}
Example.propTypes = {
/*
...
*/
}