How to set navigationOptions on stateless component with Typescript?

Posted by Editorial Staff | Updated on

If you want to set navigationOptions on stateless component with Typescript? 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:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers