Get string result from function React Native
问题 I have created a component that connects to redux and returns the currently loaded item's name as the navigation title. But when I try to get the title from this component it breaks with this error: Error: `title` cannot be defined as a function in navigation options for `StockScreen` screen. Try replacing the following: { title: ({ state }) => state... } with: ({ navigation }) => ({ title: navigation.state... }) This is my component: import { connect } from 'react-redux'; let Title = () => {